* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    color: #ece5d5;
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(
            circle at top,
            #31313b 0%,
            #15151b 42%,
            #08080c 100%
        );
}

button,
textarea {
    font: inherit;
}

.game-header {
    padding: 38px 20px 24px;
    text-align: center;
    border-bottom: 1px solid #725b32;
    background: rgba(0, 0, 0, 0.38);
}

.subtitle {
    margin: 0;
    color: #b8a57c;
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

h1 {
    margin: 12px 0;
    color: #e4c778;
    font-size: clamp(32px, 6vw, 58px);
    letter-spacing: 3px;
    text-shadow:
        0 0 12px rgba(228, 199, 120, 0.35),
        3px 3px 3px #000;
}

.server-status {
    display: inline-block;
    margin-top: 8px;
    padding: 7px 16px;
    color: #b8ffb4;
    font-size: 14px;
    border: 1px solid #467044;
    border-radius: 30px;
    background: rgba(28, 75, 31, 0.35);
}

.server-status.offline {
    color: #ffb6b6;
    border-color: #854747;
    background: rgba(100, 24, 24, 0.35);
}

.page-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(340px, 0.75fr);
    gap: 28px;
    width: min(1500px, 95%);
    margin: 36px auto;
    align-items: start;
}

.game-column {
    min-width: 0;
}

.arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 25px;
    align-items: center;
}

.fighter-card {
    min-height: 325px;
    padding: 28px;
    text-align: center;
    border: 1px solid #5d4e35;
    border-radius: 12px;
    background:
        linear-gradient(
            145deg,
            rgba(45, 43, 48, 0.96),
            rgba(18, 18, 23, 0.96)
        );
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.45),
        inset 0 0 25px rgba(255, 255, 255, 0.025);
}

.player-card {
    border-top: 4px solid #547ab3;
}

.monster-card {
    border-top: 4px solid #a34444;
}

.fighter-symbol {
    margin-bottom: 15px;
    font-size: 72px;
    filter: drop-shadow(0 8px 5px #000);
}

.fighter-card h2 {
    margin: 10px 0;
    color: #e5d6b4;
    font-size: 27px;
}

.fighter-card p {
    color: #bbb2a2;
}

.versus {
    color: #bca466;
    font-size: 31px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 28px 0 7px;
    font-size: 14px;
}

.bar-background {
    width: 100%;
    height: 22px;
    overflow: hidden;
    border: 1px solid #050505;
    border-radius: 20px;
    background: #09090b;
    box-shadow: inset 0 2px 5px #000;
}

.bar {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    transition: width 0.35s ease;
}

.player-hp {
    background:
        linear-gradient(
            90deg,
            #285487,
            #4f9ce2
        );
}

.monster-hp {
    background:
        linear-gradient(
            90deg,
            #6d2020,
            #d34a43
        );
}

.player-values {
    display: flex;
    justify-content: space-around;
    gap: 14px;
    margin-top: 15px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

button {
    min-width: 180px;
    padding: 14px 22px;
    color: white;
    font-weight: bold;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        opacity 0.15s ease;
}

button:hover:not(:disabled) {
    filter: brightness(1.18);
    transform: translateY(-2px);
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    cursor: wait;
    filter: grayscale(0.7);
    opacity: 0.55;
}

.attack-button {
    border-color: #d06b5f;
    background:
        linear-gradient(
            #9d3c34,
            #5d211d
        );
}

.heal-button {
    border-color: #69a96b;
    background:
        linear-gradient(
            #397b3d,
            #205125
        );
}

.battle-log {
    padding: 24px;
    border: 1px solid #5d4e35;
    border-radius: 10px;
    background: rgba(4, 4, 7, 0.72);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.4);
}

.battle-log h2 {
    margin-top: 0;
    color: #d6bd7e;
}

#output {
    min-height: 75px;
    padding: 18px;
    color: #ded7c6;
    line-height: 1.6;
    border-left: 4px solid #8d753f;
    background: rgba(255, 255, 255, 0.035);
}

.npc-panel {
    overflow: hidden;
    border: 1px solid #665638;
    border-top: 4px solid #9e7c42;
    border-radius: 12px;
    background:
        linear-gradient(
            155deg,
            rgba(38, 34, 40, 0.98),
            rgba(12, 12, 17, 0.98)
        );
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.5);
}

.npc-header {
    display: flex;
    gap: 17px;
    align-items: center;
    padding: 21px;
    border-bottom: 1px solid #51452f;
    background: rgba(0, 0, 0, 0.28);
}

.npc-symbol {
    display: grid;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    place-items: center;
    font-size: 44px;
    border: 1px solid #725e38;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            #49413b,
            #161318
        );
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.45);
}

.npc-title {
    min-width: 0;
}

.npc-label {
    margin: 0 0 4px;
    color: #a9956b;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.npc-title h2 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #e6cb86;
    font-size: 24px;
}

#npcMeta {
    margin: 6px 0 0;
    color: #b5ab99;
    font-size: 14px;
}

.npc-background {
    padding: 15px 20px;
    color: #a9a08e;
    font-size: 13px;
    font-style: italic;
    line-height: 1.5;
    border-bottom: 1px solid #443a2b;
    background: rgba(255, 255, 255, 0.025);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 430px;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #0d0d11;
}

.chat-messages::-webkit-scrollbar-thumb {
    border: 2px solid #0d0d11;
    border-radius: 10px;
    background: #635334;
}

.chat-message {
    max-width: 92%;
    padding: 12px 14px;
    border: 1px solid #4d463a;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow:
        0 7px 14px rgba(0, 0, 0, 0.22);
}

.user-message {
    align-self: flex-end;
    border-color: #405c7e;
    background: rgba(35, 68, 101, 0.36);
}

.assistant-message {
    align-self: flex-start;
    border-color: #6b5836;
    background: rgba(77, 61, 34, 0.32);
}

.system-message {
    align-self: center;
    color: #a9a193;
    text-align: center;
    border-style: dashed;
    background: rgba(255, 255, 255, 0.025);
}

.error-message {
    align-self: center;
    color: #ffc0c0;
    border-color: #743e3e;
    background: rgba(106, 32, 32, 0.25);
}

.message-author {
    margin-bottom: 6px;
    color: #d7bc79;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.user-message .message-author {
    color: #9fc3ec;
    text-align: right;
}

.message-content {
    color: #e3dccd;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.roleplay-emote {
    color: #c8ab69;
    font-style: italic;
}

.chat-form {
    padding: 16px 18px;
    border-top: 1px solid #4a3e2c;
    background: rgba(0, 0, 0, 0.3);
}

#chatInput {
    display: block;
    width: 100%;
    min-height: 82px;
    max-height: 170px;
    resize: vertical;
    padding: 12px 13px;
    color: #eee8db;
    line-height: 1.45;
    border: 1px solid #5b503f;
    border-radius: 7px;
    outline: none;
    background: #101015;
}

#chatInput:focus {
    border-color: #a1854f;
    box-shadow:
        0 0 0 3px rgba(161, 133, 79, 0.15);
}

#chatInput::placeholder {
    color: #777064;
}

.chat-form-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    margin-top: 11px;
}

#characterCounter {
    color: #80786a;
    font-size: 12px;
}

.chat-send-button {
    min-width: 155px;
    padding: 11px 15px;
    border-color: #a98b50;
    background:
        linear-gradient(
            #80652f,
            #493816
        );
}

.chat-status {
    min-height: 18px;
    margin: 0;
    padding: 0 20px 16px;
    color: #8e8677;
    font-size: 12px;
    text-align: center;
}

footer {
    padding: 25px;
    color: #746c5c;
    font-size: 13px;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 1100px) {
    .page-grid {
        grid-template-columns: 1fr;
    }

    .npc-panel {
        width: min(760px, 100%);
        margin: 0 auto;
    }
}

@media (max-width: 750px) {
    .arena {
        grid-template-columns: 1fr;
    }

    .versus {
        text-align: center;
    }

    .controls {
        flex-direction: column;
    }

    .controls button {
        width: 100%;
    }

    .player-values {
        flex-direction: column;
        gap: 0;
    }

    .chat-messages {
        height: 370px;
    }

    .chat-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .chat-send-button {
        width: 100%;
    }
}


/* ===== RP-ARENA BESCHREIBUNG ===== */

.arena-intro {
    width: min(1100px, 92%);
    margin: 34px auto 0;
    padding: 28px 34px;
    color: #d8d0bf;
    line-height: 1.7;
    border: 1px solid #68583a;
    border-top: 4px solid #ad8a49;
    border-radius: 12px;
    background:
        linear-gradient(
            145deg,
            rgba(38, 35, 41, 0.96),
            rgba(13, 13, 18, 0.96)
        );
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.45);
}

.arena-intro h2 {
    margin: 5px 0 18px;
    color: #e3c77f;
    font-size: clamp(26px, 4vw, 38px);
}

.arena-intro p {
    margin: 12px 0;
}

.intro-eyebrow {
    margin: 0 !important;
    color: #9e8b64;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.intro-emote {
    display: inline-block;
    color: #d1b36e;
    font-style: italic;
}

.development-note {
    margin-top: 22px;
    padding: 15px 18px;
    color: #d9c89e;
    border-left: 4px solid #b08a47;
    background: rgba(151, 115, 55, 0.12);
}

.development-note strong {
    color: #f0d68f;
}

@media (max-width: 700px) {
    .arena-intro {
        padding: 22px 20px;
    }
}

/* BEGIN ELESMERA HOMEPAGE */

body {
    background-color: #08080c;
    background-image:
        linear-gradient(
            to bottom,
            rgba(5, 5, 8, 0.12) 0,
            rgba(8, 8, 12, 0.70) 520px,
            rgba(8, 8, 12, 0.96) 100%
        ),
        url("/Background.png");
    background-position:
        center top,
        center top;
    background-size:
        cover,
        cover;
    background-repeat:
        no-repeat,
        no-repeat;
    background-attachment:
        fixed,
        fixed;
}

.elesmera-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    min-height: 64px;
    padding: 0 12px;
    border-bottom: 1px solid #55452d;
    background: rgba(5, 5, 8, 0.96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.elesmera-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 19px 14px;
    color: #d7d0c1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.elesmera-nav a:hover {
    color: #f1d17e;
    border-bottom-color: #806b3d;
    background: rgba(255, 255, 255, 0.045);
}

.elesmera-nav a.active {
    color: #e8c765;
    border-bottom-color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
}

.elesmera-brand {
    padding: 82px 20px 48px;
    text-align: center;
    text-shadow:
        0 4px 8px #000,
        0 0 24px rgba(0, 0, 0, 0.85);
}

.elesmera-brand-title {
    color: #e5cc89;
    font-size: clamp(46px, 8vw, 92px);
    font-weight: bold;
    letter-spacing: clamp(10px, 2vw, 24px);
}

.elesmera-brand-subtitle {
    margin-top: 10px;
    color: #eee6d4;
    font-size: clamp(17px, 2.5vw, 27px);
    font-style: italic;
    letter-spacing: 2px;
}

.game-header {
    padding-top: 28px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(3px);
}

.arena-intro,
.fighter-card,
.battle-log,
.npc-panel {
    backdrop-filter: blur(5px);
}

@media (max-width: 850px) {
    .elesmera-nav {
        position: relative;
    }

    .elesmera-nav a {
        padding: 13px 9px;
        font-size: 11px;
    }

    .elesmera-brand {
        padding: 52px 15px 34px;
    }
}

/* END ELESMERA HOMEPAGE */
