* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Monaco', monospace;
    background: radial-gradient(ellipse at center, #0a0f2a 0%, #000000 100%);
    color: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Звёздный фон */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxjaXJjbGUgY3g9IjUlIiBjeT0iMTAlIiByPSIxIiBmaWxsPSJ3aGl0ZSIvPjxjaXJjbGUgY3g9Ijg1JSIgY3k9IjIwJSIgcj0iMS41IiBmaWxsPSJ3aGl0ZSIvPjxjaXJjbGUgY3g9IjE1JSIgY3k9IjcwJSIgcj0iMSIgZmlsbD0id2hpdGUiLz48Y2lyY2xlIGN4PSI5MCUiIGN5PSI4MCUiIHI9IjIiIGZpbGw9IndoaXRlIi8+PC9zdmc+') repeat;
    opacity: 0.6;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Навигация */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ff6600;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffaa44;
    text-shadow: 0 0 10px #ff6600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #ffaa44;
    text-shadow: 0 0 5px #ff6600;
}

/* Главный экран */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    position: relative;
    z-index: 5;
    padding: 20px;
}

h1 {
    font-size: 4rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 5px;
}

.glitch {
    animation: glitch 1s infinite;
    color: #ffaa44;
}

@keyframes glitch {
    0%, 100% { text-shadow: -2px 0 red, 2px 0 blue; }
    50% { text-shadow: 2px 0 red, -2px 0 blue; }
}

.pig-astronaut {
    font-size: 150px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px #ffaa44);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pig-astronaut:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 25px #ffaa44);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.tagline {
    font-size: 1.5rem;
    margin: 20px 0;
    color: #ddd;
}

.cta-button {
    background: linear-gradient(45deg, #ff6600, #ffaa00);
    border: none;
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    margin: 20px 0;
    font-family: monospace;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #ff6600;
}

.counter {
    font-size: 1.2rem;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 30px;
}

/* Праздничный баннер (12 апреля) */
.cosmo-banner {
    background: rgba(255, 102, 0, 0.2);
    border: 2px solid #ff6600;
    border-radius: 20px;
    padding: 15px 25px;
    margin: 0 auto 30px auto;
    max-width: 500px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #ffaa44;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

.cosmo-date {
    color: #ffaa44;
    font-weight: bold;
    margin-right: 15px;
}

.cosmo-text {
    color: white;
}

/* Альтернативный анимированный баннер */
.cosmo-banner-animated {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #0a0f2a, #1a0f2a);
    border: 1px solid #ff6600;
    border-radius: 20px;
    margin: 0 auto 30px auto;
    max-width: 500px;
    font-weight: bold;
    color: #ffaa44;
    animation: borderPulse 2s infinite;
}

.stars-mini {
    margin-top: 8px;
    font-size: 1.3rem;
    letter-spacing: 8px;
}

@keyframes borderPulse {
    0%, 100% { border-color: #ff6600; box-shadow: 0 0 5px #ff6600; }
    50% { border-color: #ff0066; box-shadow: 0 0 15px #ff0066; }
}

/* Контентные страницы */
.content {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
    position: relative;
    z-index: 5;
}

.content h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.mission-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 5px solid #ff6600;
}

.mission-card h2 {
    color: #ffaa44;
    margin-bottom: 15px;
}

.mission-card ul {
    padding-left: 25px;
}

.mission-card li {
    margin: 10px 0;
}

.progress-bar {
    background: #333;
    border-radius: 20px;
    height: 30px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    background: linear-gradient(90deg, #ff6600, #ffaa00);
    height: 100%;
    border-radius: 20px;
    transition: width 1s;
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.gallery-item {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255,102,0,0.5);
}

/* Стили для картинок в галерее */
.gallery-item img {
    width: 100%;
    max-width: 250px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.image-placeholder {
    font-size: 80px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 15px;
}

.gallery-subtitle {
    text-align: center;
    margin-bottom: 20px;
    color: #ccc;
}

/* Подвал */
footer {
    text-align: center;
    padding: 30px;
    background: rgba(0,0,0,0.8);
    margin-top: 50px;
    position: relative;
    z-index: 5;
    border-top: 1px solid #ff6600;
}

/* Адаптация под телефон */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    nav ul {
        gap: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .pig-astronaut {
        font-size: 80px;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .content h1 {
        font-size: 1.8rem;
    }
    
    .gallery-item img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    .cosmo-banner, .cosmo-banner-animated {
        font-size: 0.8rem;
        padding: 10px;
        max-width: 90%;
    }
}

.rocket-button {
    background: linear-gradient(45deg, #ff0066, #ff6600);
    margin-left: 15px;
}

@media (max-width: 768px) {
    .rocket-button {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Прямая трансляция */
#liveBroadcast {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 15px;
    margin: 15px 0;
    font-size: 1.1rem;
    border-left: 3px solid #ff6600;
}

#progressBar {
    width: 100%;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
}

#progressBar::-webkit-progress-bar {
    background-color: #333;
    border-radius: 10px;
}

#progressBar::-webkit-progress-value {
    background: linear-gradient(90deg, #ff6600, #ff0066);
    border-radius: 10px;
}

#progressBar::-moz-progress-bar {
    background: linear-gradient(90deg, #ff6600, #ff0066);
    border-radius: 10px;
}


/* Бесконечная загрузка видео */
.video-loading-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin: 30px auto;
    max-width: 600px;
    border: 1px solid #ff6600;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

.video-loading-card h2 {
    text-align: center;
    color: #ffaa44;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.video-placeholder {
    background: #000;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.video-preview {
    font-size: 80px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px #ff6600);
}

.loading-animation {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    border-top: 3px solid #ff6600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1rem;
    color: #ffaa44;
    display: flex;
    align-items: center;
    gap: 5px;
}

.loading-dots::after {
    content: '';
    animation: dots 2s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.signal-bars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
}

.signal-bars .bar {
    width: 8px;
    height: 20px;
    background: #ff6600;
    border-radius: 3px;
    animation: signalPulse 1s ease-in-out infinite;
}

.signal-bars .bar:nth-child(1) { animation-delay: 0s; height: 10px; }
.signal-bars .bar:nth-child(2) { animation-delay: 0.2s; height: 16px; }
.signal-bars .bar:nth-child(3) { animation-delay: 0.4s; height: 22px; }
.signal-bars .bar:nth-child(4) { animation-delay: 0.6s; height: 16px; }
.signal-bars .bar:nth-child(5) { animation-delay: 0.8s; height: 10px; }

@keyframes signalPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.video-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    font-size: 0.8rem;
    color: #ffaa44;
}

.video-controls span:first-child {
    color: #ff0066;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* Фиксированный размер блока трансляции */
.video-loading-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin: 30px auto;
    max-width: 600px;
    width: 100%;
    min-width: 280px;
    border: 1px solid #ff6600;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

.video-placeholder {
    background: #000;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-preview {
    font-size: 80px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px #ff6600);
    height: 90px;
}

.loading-animation {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 100px;
}

.loading-text-container {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-text {
    font-size: 1rem;
    color: #ffaa44;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.signal-bars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    height: 30px;
}

/* Для мобильных телефонов */
@media (max-width: 768px) {
    .video-placeholder {
        padding: 20px 15px;
        min-height: 250px;
    }
    
    .video-preview {
        font-size: 60px;
        height: 70px;
    }
    
    .loading-text {
        font-size: 0.85rem;
        white-space: normal;
        word-break: keep-all;
    }
    
    .loading-animation {
        min-height: 90px;
    }
    
    .loading-text-container {
        min-height: 60px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .loading-text {
        font-size: 0.75rem;
    }
    
    .video-controls {
        font-size: 0.55rem;
        gap: 8px;
    }
}
