/* Reset and base styles */
* {
    box-sizing: border-box;
}

#age-restriction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.95));
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    animation: fadeIn 0.3s ease-out;
}

.age-box {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    text-align: center;
    max-width: 480px;
    width: 90%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: slideUp 0.4s ease-out;
}

.age-box h1 {
    margin: 0 0 1.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.age-box p {
    margin: 0 0 2.5rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #d1d5db;
}

.age-box strong {
    color: #fbbf24;
    font-weight: 600;
}

.age-box .buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.age-box button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 160px;
    position: relative;
    overflow: hidden;
}

.age-box button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.age-box button:hover::before {
    left: 100%;
}

#enter-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

#enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

#enter-btn:active {
    transform: translateY(0);
}

#exit-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

#exit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

#exit-btn:active {
    transform: translateY(0);
}

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

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design */
@media (max-width: 640px) {
    .age-box {
        padding: 2rem 1.5rem;
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .age-box h1 {
        font-size: 1.75rem;
    }

    .age-box p {
        font-size: 1rem;
    }

    .age-box .buttons {
        flex-direction: column;
        align-items: center;
    }

    .age-box button {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .age-box {
        padding: 1.5rem 1rem;
    }

    .age-box h1 {
        font-size: 1.5rem;
    }
}

/* Accessibility improvements */
.age-box button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.age-box button:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .age-box {
        background: #000000;
        border: 2px solid #ffffff;
    }

    .age-box h1 {
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
    }

    .age-box p {
        color: #ffffff;
    }

    .age-box strong {
        color: #ffff00;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    #age-restriction-overlay,
    .age-box,
    .age-box button {
        animation: none;
        transition: none;
    }

    .age-box button:hover {
        transform: none;
    }
}