/* PWA Styles for XEsport */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background: #000;
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, 
        rgba(0,0,0,0.9) 0%, 
        rgba(0,0,0,0.5) 50%,
        rgba(0,0,0,0.3) 100%
    );
}

.video-container video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.video-container video.loaded {
    opacity: 1;
}

.content {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.welcome-text {
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #0066FF, #00C6FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
}

.join-button {
    display: inline-block;
    padding: 15px 40px;
    background: #00C6FF;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3);
    transition: all 0.3s ease;
}

.join-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 198, 255, 0.4);
}

.buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.btn {
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login {
    background: #0066FF;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-signup {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-signup:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* Sound Permission Styles */
.sound-permission {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.permission-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 90%;
    width: 320px;
}

.permission-icon {
    font-size: 40px;
    color: #0066FF;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.permission-content h3 {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
}

.permission-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    font-size: 14px;
}

.allow-btn, .skip-btn {
    padding: 12px 25px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.allow-btn {
    background: #0066FF;
    color: white;
}

.skip-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.allow-btn:hover {
    background: #0052cc;
    transform: translateY(-2px);
}

.skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sound-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sound-control:hover {
    background: rgba(0,0,0,0.7);
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PWA specific styles */
@media (display-mode: standalone) {
    /* Styles for when the app is installed and running as PWA */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-text h1 {
        font-size: 2rem;
    }

    .welcome-text p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 15px;
        margin-bottom: 0;
        z-index: 10;
    }

    .btn {
        width: 48%;
        justify-content: center;
        padding: 12px 10px;
        font-size: 1rem;
    }
    
    .content {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    .join-button {
        display: block;
        margin: 5px auto 0px;
        font-size: 1.2rem;
        padding: 15px 30px;
        background: linear-gradient(45deg, #0066FF, #00C6FF);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #000;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .welcome-text h1 {
        background: none;
        -webkit-text-fill-color: #fff;
        color: #fff;
    }
    
    .btn-login, .join-button {
        background: #fff;
        color: #000;
    }
}
