* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    display: none;
}

.video-background.show {
    display: block;
}

.video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.cubes-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cube {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #333, #555);
    border: 1px solid #666;
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

.rust-text {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.download-btn {
    background: linear-gradient(45deg, #666666, #555555);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 20px;
}

.download-btn:hover {
    background: linear-gradient(45deg, #777777, #666666);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.4);
}

.license-notice {
    color: #ccc;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 15px;
    line-height: 1.4;
}

.license-link-red {
    color: #ff4444;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
}

.license-link-red:hover {
    color: #ff6666;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    transition: all 0.4s ease;
}

.modal.show {
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #444;
    border-radius: 15px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.7) translateY(-50px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #fff;
}

.modal-content h3 {
    color: #ff4444;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #ccc;
}

.confirm-btn {
    background: linear-gradient(45deg, #ff4444, #cc3333);
    border: none;
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.confirm-btn:hover {
    background: linear-gradient(45deg, #cc3333, #ff4444);
    transform: translateY(-1px);
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.copyright {
    color: #888;
    font-size: 0.9rem;
}

.license-link a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.license-link a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Стили для страницы лицензии */
.license-page {
    justify-content: flex-start;
    padding-top: 50px;
    padding-bottom: 100px;
}

.license-page header {
    margin-bottom: 30px;
}

.back-link {
    color: #4CAF50;
    text-decoration: none;
    font-size: 1rem;
    margin-top: 20px;
    display: inline-block;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #45a049;
}

.license-content {
    max-width: 800px;
    width: 100%;
}

.license-text {
    background: rgba(26, 26, 26, 0.8);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
    line-height: 1.6;
}

.license-text h2 {
    color: #ff4444;
    margin-bottom: 30px;
    text-align: center;
}

.license-text h3 {
    color: #4CAF50;
    margin: 25px 0 15px 0;
    font-size: 1.2rem;
}

.license-text p {
    margin-bottom: 15px;
    color: #ccc;
}

.warning {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    border-radius: 8px;
    padding: 15px;
    margin-top: 30px;
    color: #ffcccc;
}

/* Адаптивность */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .license-text {
        padding: 20px;
    }
}

/* Стили для проверки "Я не робот" */
.robot-check {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

.robot-check.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.robot-check-content {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    max-width: 400px;
    width: 90%;
    animation: slideInUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
}

.robot-check.fade-out .robot-check-content {
    animation: slideOutDown 0.5s ease forwards;
}

.robot-check h2 {
    color: #ff4444;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.robot-check p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.robot-btn {
    background: linear-gradient(45deg, #666666, #555555);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
    font-weight: bold;
}

.robot-btn:hover {
    background: linear-gradient(45deg, #777777, #666666);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.4);
}

.hidden {
    display: none !important;
}
/* Анимации для загрузки сайта */
@keyframes siteLoadIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.content.site-loaded {
    animation: siteLoadIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Анимация для заголовка */
@keyframes titleGlow {
    0%, 100% {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 20px rgba(255, 68, 68, 0.3);
    }
    50% {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 30px rgba(255, 68, 68, 0.6);
    }
}

h1 {
    animation: titleGlow 3s ease-in-out infinite;
}

/* Анимация для кнопки скачать */
@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 102, 102, 0.5);
    }
}

.download-btn {
    animation: buttonPulse 2s ease-in-out infinite;
}

/* Анимация появления кубиков */
@keyframes cubeSpawn {
    from {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    to {
        opacity: 0.7;
        transform: scale(1) rotate(360deg);
    }
}

.cube.spawning {
    animation: cubeSpawn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}