/* /var/www/family-site/css/starwars.css */

#starwars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    perspective: 800px;
    perspective-origin: center 300px;
    overflow: hidden;
}

#starwars-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(white, rgba(255,255,255,0.2) 2px, transparent 3px);
    background-size: 50px 50px;
    animation: stars 60s linear infinite;
    opacity: 0.5;
}

@keyframes stars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}

#far-far-away {
    color: #4bd5ee;
    font-family: Arial, sans-serif;
    font-size: 48px;
    line-height: 1.5;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: fade-in-out 6s linear 5s forwards;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    z-index: 10;
}

@keyframes fade-in-out {
    0%   { opacity:0; }
    16%  { opacity:1; }
    84%  { opacity:1; }
    100% { opacity:0; }
}

#starwars-logo {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: logo 25s linear 12s forwards;
    width: 100%;
    text-align: center;
    z-index: 10;
}

@keyframes logo {
    0%   { transform: translate(-50%, -50%) translateZ(0); opacity:0; }
    0.1% { transform: translate(-50%, -50%) translateZ(0); opacity:1; }
    50%  { transform: translate(-50%, -50%) translateZ(-50000px); opacity:1; }
    60%  { transform: translate(-50%, -50%) translateZ(-60000px); opacity:0; }
    100% { transform: translate(-50%, -50%) translateZ(-100000px); opacity:0; }
}

#crawl-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1000px;
    color: #ffd700;
    font-family: Arial, sans-serif;
    font-size: 36px;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    animation: crawl 120s linear 16s forwards;
    transform-style: preserve-3d;
    transform-origin: center bottom;
    z-index: 10;
}

#crawl-container .title {
    font-size: 96px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 50px;
    transform: scaleX(0.6);
}

#crawl-container .subtitle {
    font-size: 48px;
    margin-bottom: 30px;
}

#crawl-container p {
    margin-bottom: 20px;
    white-space: pre-wrap;
}

@keyframes crawl {
    0%   { 
        transform: translateX(-50%) rotateX(80deg) translateZ(200px) translateY(1100px); 
        opacity:1; 
    }
    40%  { 
        transform: translateX(-50%) rotateX(80deg) translateZ(200px) translateY(-340px); 
        opacity:1; 
    }
    80%  { 
        transform: translateX(-50%) rotateX(80deg) translateZ(200px) translateY(-1780px); 
        opacity:0; 
    }
    100% { 
        transform: translateX(-50%) rotateX(80deg) translateZ(200px) translateY(-2500px); 
        opacity:0; 
    }
}

#starwars-close {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 20;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: all 0.3s;
}

#starwars-close:hover {
    background: rgba(255,255,255,0.5);
}
/* Адаптивность для Star Wars страницы */
@media screen and (max-width: 768px) {
    #far-far-away {
        font-size: 24px;
    }
    
    #logo {
        font-size: 60px;
        letter-spacing: 5px;
    }
    
    #crawl-content {
        width: 90%;
        font-size: 18px;
    }
    
    .episode-number {
        font-size: 36px;
    }
    
    .episode-title {
        font-size: 42px;
    }
    
    .crawl-text p {
        font-size: 18px;
        margin: 20px 0;
    }
    
    #close-btn,
    #music-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    #far-far-away {
        font-size: 18px;
    }
    
    #logo {
        font-size: 40px;
        letter-spacing: 3px;
    }
    
    .episode-number {
        font-size: 28px;
    }
    
    .episode-title {
        font-size: 32px;
    }
    
    .crawl-text p {
        font-size: 16px;
    }
    
    #close-btn,
    #music-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    #music-btn {
        top: 10px;
        right: 10px;
    }
    
    #close-btn {
        bottom: 10px;
        right: 10px;
    }
}