/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

body {
    background: linear-gradient(135deg, 
        #0a0515 0%, 
        #0d0a1a 25%, 
        #050810 50%, 
        #030509 75%, 
        #04060a 100%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Animated gradient background - più scuro */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(45, 0, 80, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 60, 60, 0.1) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 2rem;
}

/* Logo principale nella card (video animato) */
.logo-main {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 2.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Stili specifici per video logo */
.logo-main video {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.logo-main img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

/* Main Content */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

/* Glassmorphism Card - sfondo nero */
.card {
    background: #000000;
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.8),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 600px;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status Message */
.status {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    opacity: 0.9;
    font-weight: 300;
}

/* Animated Bar */
.animated-bar {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.bar-track {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 25%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(255, 255, 255, 0.4) 75%,
        transparent 100%
    );
    border-radius: 2px;
    animation: shimmer 2.5s infinite ease-in-out;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    animation-delay: 0.3s;
}

@keyframes shimmer {
    0% {
        left: -50%;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Attribution */
.attribution {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.beq-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease, border-color 0.3s ease;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 2px 0;
}

.beq-link:hover,
.beq-link:active {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .card {
        padding: 3rem 2rem;
        border-radius: 20px;
        max-width: 90%;
    }
    
    .logo-main {
        max-height: 150px;
        margin-bottom: 2rem;
    }
    
    .logo-main video {
        max-height: 150px;
    }
    
    .status {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .bar-track {
        width: 180px;
    }
    
    .attribution {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .card {
        padding: 2.5rem 1.5rem;
        border-radius: 16px;
        max-width: 95%;
    }
    
    .logo-main {
        max-height: 120px;
        margin-bottom: 1.5rem;
    }
    
    .logo-main video {
        max-height: 120px;
    }
    
    .status {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .bar-track {
        width: 150px;
        height: 2px;
    }
    
    .attribution {
        font-size: 0.65rem;
        line-height: 1.4;
    }
}

/* Ottimizzazioni per dispositivi touch */
@media (hover: none) and (pointer: coarse) {
    .beq-link {
        padding: 4px 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Supporto per orientamento landscape su mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .card {
        padding: 2rem 2rem;
    }
    
    .logo-main {
        max-height: 100px;
        margin-bottom: 1rem;
    }
    
    .status {
        margin-bottom: 1rem;
    }
}
