:root {
    --gold: #d4af37;
    --gold-light: #f1c40f;
    --bg-dark: #0a0a0c;
    --red: #c0392b;
    --text-main: #e0e0e0;
    --text-dim: #aaa;
}

* {
    box-sizing: border-box;
    user-select: none;
}

@keyframes ambientFog {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
    50% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.6); }
    100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
}

body {
    background: linear-gradient(-45deg, #050505, #111418, #08080a, #15111d);
    background-size: 400% 400%;
    animation: ambientFog 20s ease infinite;
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.fullscreen-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 30px 20px;
    max-width: 750px; 
    margin: 0 auto;
}

#title-screen {
    justify-content: center;
    text-align: center;
}

.game-title {
    font-size: 4.5rem;
    margin: 0;
    color: #fff;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.4), 0 5px 20px rgba(0, 0, 0, 0.9);
    letter-spacing: 8px;
    font-family: 'Cinzel', serif;
    font-weight: 400;
}

.game-title strong { color: var(--gold-light); }

.game-subtitle {
    color: var(--text-dim);
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    letter-spacing: 12px;
    margin-top: 5px;
    margin-bottom: 50px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.intro-hook {
    color: var(--gold);
    font-family: 'Lora', serif;
    font-style: italic;
    margin-bottom: 60px;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 450px;
    opacity: 0.8;
}

#player-name-input {
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

#player-name-input:focus {
    border-color: var(--gold-light) !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 10px rgba(0,0,0,0.8);
    transform: scale(1.02);
}

.pulse-btn {
    animation: pulseGlow 3s infinite;
    width: auto;
    padding: 18px 40px;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    font-size: 1.1rem;
    border-radius: 30px;
    border-left: 1px solid #444;
    border: 1px solid var(--gold);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: 25px;
}

.location-tag {
    color: var(--text-dim);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.stats-tag {
    font-weight: bold;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    padding: 6px 18px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
}

.pv-tag {
    color: #ff7675;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.25) 0%, rgba(20, 5, 5, 0.85) 100%);
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.velys-tag {
    color: var(--gold-light);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(20, 20, 5, 0.85) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.story-panel {
    flex: 0 0 auto;
    max-height: 50%;
    width: 100%;
    overflow-y: auto;
    padding: 30px;
    background: linear-gradient(to bottom, rgba(20, 20, 25, 0.85), rgba(10, 10, 12, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 2px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.9), inset 0 0 30px rgba(212, 175, 55, 0.03);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.story-panel::-webkit-scrollbar { width: 3px; }
.story-panel::-webkit-scrollbar-track { background: transparent; }
.story-panel::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.3); border-radius: 3px; }

.story-text {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cfcfcf;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
    animation: fadeInText 0.6s ease-out;
}

.story-text p {
    margin-top: 0;
    margin-bottom: 20px;
}

.dialogue {
    color: var(--gold-light);
    font-style: italic;
    font-weight: 500;
}

.character-dialogue {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    animation: fadeInText 0.4s ease-out;
}

.portrait-ring {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
}

.portrait-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-name {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.choices-area {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
    padding-bottom: 20px;
}

.choices-area::-webkit-scrollbar { width: 3px; }
.choices-area::-webkit-scrollbar-track { background: transparent; }
.choices-area::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.3); border-radius: 3px; }

.action-btn {
    width: 100%;
    background: linear-gradient(90deg, rgba(30, 30, 35, 0.8) 0%, rgba(15, 15, 20, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid #555;
    color: #dedede;
    padding: 16px 20px;
    text-align: left;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.action-btn:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, rgba(20, 20, 25, 0.8) 100%);
    border-color: rgba(212, 175, 55, 0.3);
    border-left: 5px solid var(--gold);
    padding-left: 25px;
    color: #fff;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.action-btn:active {
    transform: scale(0.99);
}

.action-btn.disabled {
    border-left-color: #222;
    color: #555;
    background: rgba(10, 10, 10, 0.5);
    cursor: not-allowed;
    box-shadow: none;
}

.action-btn.disabled:hover {
    background: rgba(10, 10, 10, 0.5);
    padding-left: 20px;
    border-color: rgba(255, 255, 255, 0.05);
    color: #555;
}

.choice-cost {
    float: right;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (max-width: 600px) {
    .fullscreen-container { padding: 20px 15px; }
    .game-title { font-size: 3rem; }
    .game-subtitle { font-size: 1rem; letter-spacing: 6px; }
    .story-panel { padding: 20px; }
    .story-text { font-size: 1.05rem; }
    .action-btn { padding: 14px 15px; font-size: 0.95rem; }
    .action-btn:hover { padding-left: 15px; }
}