/* Eveningcast - Game Styles */

:root {
    --primary-bg: #fef8f0;
    --secondary-bg: #f9f1e7;
    --accent-color: #d4a373;
    --text-color: #5d4e37;
    --text-secondary: #8b7355;
    --choice-bg: #fff9f0;
    --choice-hover: #f5e6d3;
    --warm-glow: #c9a87c;
    --border-color: #e8d5c4;
    --shadow-color: rgba(212, 163, 115, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    background-attachment: fixed;
}

#game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

/* Main Menu */
#main-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    text-align: center;
}

.logo-container {
    margin-bottom: 60px;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(201, 168, 124, 0.3), 0 0 30px rgba(201, 168, 124, 0.2);
    }
    50% {
        text-shadow: 0 0 30px rgba(201, 168, 124, 0.4), 0 0 40px rgba(201, 168, 124, 0.3);
    }
}

.game-title {
    font-size: 4.5rem;
    font-weight: bold;
    color: var(--warm-glow);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-style: italic;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.menu-btn {
    background: var(--choice-bg);
    color: var(--text-color);
    border: 2px solid var(--accent-color);
    padding: 15px 50px;
    font-size: 1.2rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
    min-width: 250px;
}

.menu-btn:hover {
    background: var(--choice-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.credits {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 20px;
}

/* Game Screen */
#game-screen {
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 249, 240, 0.9);
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.header-btn {
    background: var(--choice-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
}

.header-btn:hover {
    background: var(--choice-hover);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.location-display {
    font-size: 1.1rem;
    color: var(--warm-glow);
    font-style: italic;
}

.story-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.7);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    position: relative;
    overflow-y: auto;
    max-height: 60vh;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.character-box {
    background: rgba(245, 230, 211, 0.8);
    padding: 15px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
    color: var(--text-color);
    animation: slideInLeft 0.5s ease;
}

.story-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
    white-space: pre-wrap;
}

.story-text p {
    margin-bottom: 15px;
}

.story-text .japanese {
    color: var(--warm-glow);
    font-style: italic;
}

.story-text .translation {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.choice-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.choice-btn {
    background: var(--choice-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 15px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Georgia', serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    opacity: 0;
    animation: choiceFadeIn 0.5s ease forwards;
}

.choice-btn:nth-child(1) { animation-delay: 0.2s; }
.choice-btn:nth-child(2) { animation-delay: 0.4s; }
.choice-btn:nth-child(3) { animation-delay: 0.6s; }
.choice-btn:nth-child(4) { animation-delay: 0.8s; }

.choice-btn::before {
    content: '▶';
    margin-right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--accent-color);
}

.choice-btn:hover::before {
    opacity: 1;
}

.choice-btn:hover {
    background: var(--choice-hover);
    transform: translateX(10px);
    box-shadow: 0 5px 20px var(--shadow-color);
    border-color: var(--accent-color);
}

.game-footer {
    padding: 10px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--warm-glow));
    transition: width 0.5s ease;
    width: 0%;
}

/* Settings Screen */
#settings-screen {
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

#settings-screen h2 {
    text-align: center;
    color: var(--warm-glow);
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.settings-content {
    background: rgba(255, 255, 255, 0.7);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.setting-item {
    margin-bottom: 30px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 8px;
    background: var(--secondary-bg);
    border-radius: 5px;
    outline: none;
    border: 2px solid var(--border-color);
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
}

.setting-item input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

/* Animations */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typing {
    animation: typing 0.05s steps(1);
}

@keyframes typing {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 3rem;
    }

    .story-text {
        font-size: 1rem;
    }

    .choice-btn {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .menu-btn {
        min-width: 200px;
        font-size: 1rem;
    }
}

/* Special Effects */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Particle Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Impact Overlay for Big Moments */
.impact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(254, 248, 240, 0.98), rgba(249, 241, 231, 0.98));
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.impact-overlay.active {
    display: flex;
    animation: fadeInOverlay 0.8s ease forwards;
}

@keyframes fadeInOverlay {
    to {
        opacity: 1;
    }
}

.impact-text {
    font-size: 4rem;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-color), var(--warm-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 40px;
    animation: impactPulse 2s ease-in-out;
    max-width: 80%;
    line-height: 1.4;
}

@keyframes impactPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Text Fade Animations */
.story-text p {
    margin-bottom: 15px;
    opacity: 0;
    animation: textFadeIn 0.6s ease forwards;
}

.story-text p:nth-child(1) { animation-delay: 0.1s; }
.story-text p:nth-child(2) { animation-delay: 0.2s; }
.story-text p:nth-child(3) { animation-delay: 0.3s; }
.story-text p:nth-child(4) { animation-delay: 0.4s; }
.story-text p:nth-child(5) { animation-delay: 0.5s; }
.story-text p:nth-child(n+6) { animation-delay: 0.6s; }

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

/* Thought Text Effect */
.thought-text {
    font-style: italic;
    color: var(--text-secondary);
    opacity: 0;
    animation: thoughtFade 2s ease-in-out forwards;
}

@keyframes thoughtFade {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
}

/* Decorative Elements */
.story-container::before {
    content: '❧';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--accent-color);
    opacity: 0.5;
}

.character-box {
    background: rgba(245, 230, 211, 0.8);
    padding: 15px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
    color: var(--text-color);
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Choice Button Enhanced Animation */
.choice-btn {
    background: var(--choice-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 15px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Georgia', serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    opacity: 0;
    animation: choiceFadeIn 0.5s ease forwards;
}

.choice-btn:nth-child(1) { animation-delay: 0.2s; }
.choice-btn:nth-child(2) { animation-delay: 0.4s; }
.choice-btn:nth-child(3) { animation-delay: 0.6s; }
.choice-btn:nth-child(4) { animation-delay: 0.8s; }

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

/* Relationship & Achievement Notifications */
.relationship-notification,
.level-up-notification,
.achievement-notification {
    position: fixed;
    top: 80px;
    right: 30px;
    background: rgba(255, 249, 240, 0.98);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 10px 30px var(--shadow-color);
    z-index: 2000;
    animation: slideInRight 0.5s ease;
    max-width: 350px;
}

.relationship-notification.fade-out,
.level-up-notification.fade-out,
.achievement-notification.fade-out {
    animation: slideOutRight 0.5s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-content strong {
    color: var(--accent-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

.notification-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.level-up-notification {
    background: linear-gradient(135deg, rgba(254, 248, 240, 0.98), rgba(249, 241, 231, 0.98));
}

.level-up-content {
    text-align: center;
}

.level-up-content h2 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.level-up-content p {
    color: var(--text-color);
    font-size: 1.1rem;
    text-transform: capitalize;
    margin-bottom: 8px;
}

.level-up-content h3 {
    color: var(--warm-glow);
    font-size: 1.3rem;
    font-style: italic;
}

.achievement-content {
    display: flex;
    gap: 15px;
    align-items: center;
}

.achievement-icon {
    font-size: 3rem;
}

.achievement-text h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.achievement-text h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.achievement-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}
