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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    max-height: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    border: 3px solid #d4af37;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
    background: linear-gradient(to bottom, #87ceeb 0%, #ff6b6b 100%);
    max-width: 100%;
    max-height: 100%;
}

/* Title Screen */
.title-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #1a0033 50%, #330000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 1s ease-in;
}

.title-screen.hidden {
    display: none;
}

.title {
    font-size: 4rem;
    color: #d4af37;
    text-shadow: 
        0 0 10px #ff6b6b,
        0 0 20px #ff6b6b,
        0 0 30px #ff0000,
        2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.subtitle {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 3rem;
    animation: fadeIn 2s ease-in;
}

.start-button {
    font-size: 1.5rem;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #d4af37 0%, #f2d06b 100%);
    border: 3px solid #fff;
    border-radius: 10px;
    color: #1a0033;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.start-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
}

/* Text Box */
.text-box {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 0, 51, 0.95) 100%);
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 20px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 100;
    animation: slideUp 0.4s ease-out;
}

.text-box.hidden {
    display: none;
}

.text-box-content {
    position: relative;
}

.speaker-name {
    font-size: 1.3rem;
    color: #d4af37;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.dialogue-text {
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    min-height: 60px;
}

.continue-indicator {
    position: absolute;
    bottom: -10px;
    right: 20px;
    color: #d4af37;
    font-size: 1.5rem;
    animation: bounce 1s ease-in-out infinite;
}

/* Controls */
.controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 50;
}

.controls.hidden {
    display: none;
}

.control-btn {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #d4af37;
    border-radius: 5px;
    color: #d4af37;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        bottom: -200px;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 10px #ff6b6b,
            0 0 20px #ff6b6b,
            0 0 30px #ff0000,
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    to {
        text-shadow: 
            0 0 20px #ff6b6b,
            0 0 30px #ff6b6b,
            0 0 40px #ff0000,
            0 0 50px #ff0000,
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .start-button {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }
    
    .text-box {
        width: 95%;
        padding: 15px 20px;
    }
    
    .speaker-name {
        font-size: 1rem;
    }
    
    .dialogue-text {
        font-size: 0.9rem;
    }
}


