:root {
    --primary: #ffcc00;
    --secondary: #2c3e50;
    --accent: #28a745;
    --android: #3ddc84;
    --pc: #0078d7;
    --dark: #1a1a1a;
    --light: #f8f8f8;
    --gray: #444;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000010;
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Canvas для фона */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Партиклы для ПК */
.floating-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Прелоадер */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2a6c 0%, #2c3e50 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    animation: pulse 2s infinite, rotate 3s linear infinite;
}

.preloader-text {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 204, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes rotate {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}

/* Шапка сайта */
header {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(26, 26, 26, 0.9) 100%);
    padding: 20px;
    text-align: center;
    border-bottom: 5px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,204,0,0.1) 0%, transparent 50%, rgba(255,204,0,0.1) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 2.5rem;
    color: var(--primary);
    animation: pulse 2s infinite, rotate 8s linear infinite;
}

h1 {
    margin: 0;
    font-size: 2.5em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: textGlow 3s ease-in-out infinite alternate;
    position: relative;
    display: inline-block;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes textGlow {
    0% { 
        text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
        transform: translateY(0);
    }
    50% { 
        text-shadow: 0 0 20px rgba(255, 204, 0, 0.8), 0 0 30px rgba(255, 204, 0, 0.6);
        transform: translateY(-2px);
    }
    100% { 
        text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
        transform: translateY(0);
    }
}

h2 {
    margin: 10px 0 0;
    font-size: 1.5em;
    font-weight: 300;
    color: var(--primary);
    position: relative;
    z-index: 1;
    animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Навигация */
nav {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

nav a {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    transition: var(--transition);
    border: 1px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

nav a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.3), transparent);
    transition: all 0.6s ease;
}

nav a:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 204, 0, 0.3);
}

nav a:hover::before {
    left: 100%;
}

/* Улучшенные анимации для ПК */
@media (min-width: 769px) {
    nav a {
        animation: navFloat 6s ease-in-out infinite;
    }

    nav a:nth-child(1) { animation-delay: 0s; }
    nav a:nth-child(2) { animation-delay: 0.2s; }

    @keyframes navFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }

    nav a:hover {
        animation: navHover 0.5s ease forwards;
    }

    @keyframes navHover {
        0% { transform: translateY(-5px) scale(1.05); }
        50% { transform: translateY(-8px) scale(1.08); }
        100% { transform: translateY(-5px) scale(1.05); }
    }
}

/* Основной контент */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-box {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--light);
    font-size: 1.1em;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.search-box:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.2), 0 0 15px rgba(255, 204, 0, 0.1);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2em;
}

.platform-switcher {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.platform-btn {
    padding: 12px 25px;
    border: 2px solid var(--primary);
    background: rgba(0, 0, 0, 0.7);
    color: var(--primary);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.platform-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.3), transparent);
    transition: all 0.6s ease;
}

.platform-btn.active {
    background: var(--primary);
    color: var(--dark);
}

.platform-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 204, 0, 0.3);
}

.platform-btn:hover::before {
    left: 100%;
}

/* Улучшенные кнопки для ПК */
@media (min-width: 769px) {
    .platform-btn {
        animation: pcPulseBtn 3s ease-in-out infinite;
    }

    @keyframes pcPulseBtn {
        0%, 100% { 
            transform: scale(1);
            box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
        }
        50% { 
            transform: scale(1.03);
            box-shadow: 0 6px 20px rgba(255, 204, 0, 0.5);
        }
    }

    .platform-btn:hover {
        background: #e6b800;
        transform: translateY(-5px) scale(1.08);
        box-shadow: 0 10px 25px rgba(255, 170, 0, 0.6);
        animation: none;
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Сетка файлов */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.file-card {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: float 6s ease-in-out infinite;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(0.5deg); }
    66% { transform: translateY(-5px) rotate(-0.5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Улучшенные карточки для ПК */
@media (min-width: 769px) {
    .file-card {
        animation: pcFloat 8s ease-in-out infinite;
    }

    @keyframes pcFloat {
        0% { transform: translateY(0px) rotate(0deg) scale(1); }
        25% { transform: translateY(-12px) rotate(0.7deg) scale(1.005); }
        50% { transform: translateY(-5px) rotate(-0.7deg) scale(1.01); }
        75% { transform: translateY(-8px) rotate(0.3deg) scale(1.005); }
        100% { transform: translateY(0px) rotate(0deg) scale(1); }
    }

    .file-card:hover {
        transform: translateY(-15px) scale(1.03) rotate(1deg);
        box-shadow: 0 20px 40px rgba(255, 204, 0, 0.4);
        animation-play-state: paused;
        border-color: var(--primary);
    }
}

.file-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    text-align: center;
    transition: transform 0.5s ease;
}

.file-card:hover .file-icon {
    transform: rotate(15deg) scale(1.3);
    animation: gameIconPulse 1s infinite;
}

@keyframes gameIconPulse {
    0% { 
        text-shadow: 0 0 0 rgba(255, 204, 0, 0.5);
        transform: rotate(15deg) scale(1.3);
    }
    50% { 
        text-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
        transform: rotate(20deg) scale(1.4);
    }
    100% { 
        text-shadow: 0 0 0 rgba(255, 204, 0, 0.5);
        transform: rotate(15deg) scale(1.3);
    }
}

.platform-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.pc-badge {
    background: #007acc;
    color: white;
}

.android-badge {
    background: #3ddc84;
    color: black;
}

.file-name {
    color: var(--primary);
    margin: 0 0 10px 0;
    font-size: 1.3em;
    animation: slideIn 1s ease;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.file-description {
    color: #cccccc;
    margin: 0 0 15px 0;
    flex-grow: 1;
    animation: fadeIn 1.5s ease;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #999999;
    animation: fadeIn 1.5s ease;
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary);
    color: var(--dark);
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    animation: pulseBtn 2s infinite;
    position: relative;
    overflow: hidden;
}

@keyframes pulseBtn {
    0% { 
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7);
        transform: scale(1);
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(255, 204, 0, 0);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0);
        transform: scale(1);
    }
}

.download-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s ease;
}

/* Улучшенные кнопки скачивания для ПК */
@media (min-width: 769px) {
    .download-btn {
        animation: pcPulseBtn 3s ease-in-out infinite;
    }

    .download-btn:hover {
        background: #e6b800;
        transform: translateY(-5px) scale(1.08);
        box-shadow: 0 10px 25px rgba(255, 170, 0, 0.6);
        animation: none;
        border-color: rgba(255, 255, 255, 0.3);
    }

    .download-btn:hover::before {
        left: 100%;
    }

    .download-btn:hover i {
        transform: rotate(15deg) scale(1.3);
        animation: iconBounce 0.5s ease;
    }

    @keyframes iconBounce {
        0%, 100% { transform: translateX(0) rotate(15deg) scale(1.3); }
        50% { transform: translateX(-3px) rotate(20deg) scale(1.4); }
    }
}

.download-btn i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999999;
    display: none;
    grid-column: 1 / -1;
    animation: fadeIn 1.5s ease;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

/* Подвал сайта */
footer {
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--light);
    border-top: 1px solid var(--primary);
    margin-top: auto;
    position: relative;
    backdrop-filter: blur(5px);
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,204,0,0.05) 0%, transparent 50%, rgba(255,204,0,0.05) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    z-index: 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--dark);
    border-radius: 50%;
    font-size: 1.3rem;
    transition: var(--transition);
    animation: floatSocial 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s ease;
}

@keyframes floatSocial {
    0% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0); }
}

.social-links a:nth-child(1) { animation-delay: 0s; }
.social-links a:nth-child(2) { animation-delay: 0.2s; }
.social-links a:nth-child(3) { animation-delay: 0.4s; }

/* Улучшенные социальные иконки для ПК */
@media (min-width: 769px) {
    .social-links a:hover {
        transform: translateY(-8px) rotate(10deg) scale(1.2);
        background: var(--light);
        animation: socialSpin 0.6s ease;
    }

    .social-links a:hover::before {
        left: 100%;
    }

    @keyframes socialSpin {
        0% { transform: translateY(-8px) rotate(10deg) scale(1.2); }
        100% { transform: translateY(-8px) rotate(370deg) scale(1.2); }
    }
}

footer p {
    position: relative;
    z-index: 1;
}

/* Защита контента - сообщение */
.protection-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    color: var(--primary);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid var(--primary);
    z-index: 10000;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

.protection-message h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.protection-message p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.protection-message p:last-child {
    font-size: 0.9rem;
    color: #ccc;
}

/* Оптимизации для мобильных устройств */
@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.2em; }
    .file-grid { grid-template-columns: 1fr; }
    nav { flex-direction: column; align-items: center; }
    nav a { width: 100%; max-width: 300px; text-align: center; }
    .platform-switcher { flex-direction: column; align-items: center; }
    .platform-btn { width: 100%; max-width: 250px; }
    
    /* Упрощенные анимации для мобильных */
    .file-card {
        animation: float 8s ease-in-out infinite;
    }
    
    .download-btn {
        animation: none;
    }
    
    .file-card:hover {
        transform: none;
    }
    
    .file-card:hover .file-icon {
        animation: none;
        transform: none;
    }
    
    .social-links a {
        animation: none;
    }
    
    .social-links a:hover {
        animation: none;
        transform: none;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8em; }
    .download-btn { width: 100%; }
    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .preloader-text {
        font-size: 1.2rem;
    }
}