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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    filter: none !important;
}

/* Prevent blur inheritance */
.logo, .logo-container, .modal, .modal-content, .btn {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Background Video - Dual video setup */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: blur(8px);
    transform: scale(1.1);
    isolation: isolate;
    background: #000;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

.background-video.active {
    opacity: 1;
}

/* Ensure video container has black background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: -3;
}

/* Main Container */
.container {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: calc(env(safe-area-inset-top, 44px) + 120px) 20px env(safe-area-inset-bottom, 20px) 20px;
    background: rgba(0, 0, 0, 0.15);
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    padding-top: 20px;
    position: fixed;
    top: env(safe-area-inset-top, 44px);
    left: 0;
    right: 0;
    z-index: 99999;
    pointer-events: none;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.logo {
    max-width: 240px;
    max-height: 120px;
    width: auto;
    height: auto;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 100000;
    pointer-events: auto;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateZ(0);
    will-change: transform;
}

/* Content */
.content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.02em;
    background: linear-gradient(45deg, #ff006e, #8338ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px;
    filter: none !important;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background: rgba(22, 24, 35, 0.9);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #fff;
    line-height: 1.4;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(45deg, #ff006e, #8338ec);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 110, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Button ripple effect */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: calc(env(safe-area-inset-top, 60px) + 110px) 15px env(safe-area-inset-bottom, 15px) 15px;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    .modal-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .logo {
        max-width: 200px;
        max-height: 100px;
        padding: 16px 20px;
    }
    
    .logo-container {
        top: env(safe-area-inset-top, 60px);
    }
}

/* Safe area handling for notched devices */
@supports (padding: max(0px)) {
    .container {
        padding-top: calc(max(env(safe-area-inset-top), 44px) + 120px);
        padding-bottom: max(env(safe-area-inset-bottom), 20px);
    }
    
    .logo-container {
        top: max(env(safe-area-inset-top), 44px);
    }
}

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

.welcome-title {
    animation: fadeIn 1s ease-out;
}

.logo {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Dark theme adjustments for better contrast */
body {
    background: #000;
}

.modal {
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: rgba(18, 18, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Ensure text is always readable */
.modal-title, .welcome-title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Hent Theme - Red styling */
.hent-theme .welcome-title {
    background: linear-gradient(45deg, #ff0039, #dc143c, #b22222);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hent-theme .btn-primary {
    background: linear-gradient(45deg, #dc143c, #b22222);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
}

.hent-theme .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.6);
}

.hent-theme .modal-content {
    background: rgba(30, 10, 10, 0.9);
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.hent-theme .modal {
    background: rgba(20, 0, 0, 0.7);
}

.hent-theme .container {
    background: rgba(20, 0, 0, 0.2);
}
