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

body {
    overflow: hidden;
    background: #1a1a2e;
    font-family: 'Space Grotesk', sans-serif;
    color: #ffffff;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.ui-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: auto;
}

.start-screen {
    background: radial-gradient(ellipse at center, rgba(79, 195, 247, 0.1) 0%, transparent 70%);
}

.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.15) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.main-title {
    font-size: clamp(24px, 6vw, 48px);
    font-weight: 300;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(79, 195, 247, 0.5);
}

.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 500px;
}

input[type="text"] {
    width: 100%;
    padding: 18px 24px;
    font-size: 18px;
    font-family: 'Space Grotesk', sans-serif;
    background: rgba(42, 42, 78, 0.8);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 12px;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.3);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input[type="text"].reveal {
    animation: reveal 0.5s ease;
}

@keyframes reveal {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: rgba(79, 195, 247, 0.2); }
    100% { transform: scale(1); }
}

.primary-btn {
    padding: 18px 48px;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(79, 195, 247, 0.4);
}

.primary-btn.pulse {
    animation: btn-pulse 2s ease-in-out infinite;
}

@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(79, 195, 247, 0.3); }
    50% { box-shadow: 0 0 40px rgba(79, 195, 247, 0.6); }
}

.secondary-btn {
    padding: 14px 28px;
    font-size: 16px;
    font-family: 'Space Grotesk', sans-serif;
    background: transparent;
    border: 2px solid rgba(79, 195, 247, 0.5);
    border-radius: 8px;
    color: #4fc3f7;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.secondary-btn:hover {
    background: rgba(79, 195, 247, 0.1);
    border-color: #4fc3f7;
}

.tertiary-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-family: 'Space Grotesk', sans-serif;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.tertiary-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.footer {
    position: absolute;
    bottom: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.footer a {
    color: rgba(79, 195, 247, 0.6);
    text-decoration: none;
}

.footer a:hover {
    color: #4fc3f7;
}

/* Breaking screen */
.breaking-screen {
    justify-content: flex-end;
    padding-bottom: 60px;
    background: transparent;
    pointer-events: none;
}

.item-display {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.item-name {
    font-size: clamp(20px, 5vw, 32px);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
}

.instruction {
    font-size: 18px;
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    animation: fade-pulse 2s ease-in-out infinite;
}

@keyframes fade-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4fc3f7, #e91e63);
    width: 0%;
    transition: width 0.2s ease;
}

/* Post break screen */
.post-break-screen {
    background: linear-gradient(to top, rgba(26, 26, 46, 0.95) 0%, transparent 100%);
    justify-content: flex-end;
    padding-bottom: 40px;
}

.message-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.prompt-text {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.8);
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.stats {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* Art screen */
.art-screen {
    background: linear-gradient(to top, rgba(26, 26, 46, 0.98) 0%, rgba(26, 26, 46, 0.8) 100%);
    justify-content: flex-end;
    padding-bottom: 40px;
}

.art-header {
    position: absolute;
    top: 40px;
    text-align: center;
}

.art-header h1 {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.art-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
}

.art-details {
    text-align: center;
    margin-bottom: 32px;
    max-width: 400px;
}

.items-list {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    line-height: 1.6;
}

.aesthetic {
    font-size: 16px;
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    color: #4fc3f7;
}

.art-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.secondary-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .input-container {
        padding: 0 10px;
    }
    
    input[type="text"] {
        font-size: 16px;
        padding: 16px 20px;
    }
    
    .primary-btn {
        padding: 16px 36px;
        font-size: 18px;
    }
    
    .action-buttons,
    .secondary-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .secondary-btn {
        width: 100%;
    }
}