/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
    --primary-red: #e63946;
    --dark-red: #9d0208;
    --deep-red: #6a040f;
    --primary-orange: #f77f00;
    --dark-orange: #d62828;
    --primary-yellow: #fcbf49;
    --light-yellow: #ffd166;
    --accent-red: #ff4d6d;
    --accent-yellow: #ffbe0b;
    
    --bg-dark: #0d0d0d;
    --bg-darker: #050505;
    --bg-card: #1a1a1a;
    --bg-card-hover: #252525;
    
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    
    --gradient-fire: linear-gradient(135deg, var(--dark-red), var(--primary-orange), var(--primary-yellow));
    --gradient-sunset: linear-gradient(45deg, var(--deep-red), var(--primary-red), var(--primary-orange));
    --gradient-warm: linear-gradient(180deg, var(--primary-orange), var(--primary-yellow));
    
    --shadow-glow: 0 0 30px rgba(230, 57, 70, 0.3);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* ========== КАСТОМНЫЙ СКРОЛЛБАР ========== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-sunset);
    border-radius: 6px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-fire);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
}

::-webkit-scrollbar-corner {
    background: var(--bg-darker);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) var(--bg-darker);
}

/* ========== СБРОС И БАЗОВЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(230, 57, 70, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(247, 127, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(252, 191, 73, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

/* ========== ЧАСТИЦЫ ========== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: floatParticle 15s infinite ease-in-out;
    filter: blur(1px);
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-100px) translateX(50px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-50px) translateX(-30px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-150px) translateX(20px) scale(1.1);
        opacity: 0.7;
    }
}

/* ========== ХЕДЕР ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(230, 57, 70, 0.5));
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

nav ul li a {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-fire);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

nav ul li a:hover {
    color: var(--text-primary);
}

nav ul li a:hover::before,
nav ul li a.active::before {
    width: 80%;
}

nav ul li a.active {
    color: var(--primary-yellow);
}

.discord-btn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #5865F2, #7289da);
    padding: 10px 20px !important;
    border-radius: var(--border-radius) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.discord-btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(88, 101, 242, 0.5);
}

.discord-btn-header::before {
    display: none !important;
}

/* ========== ПЛАВАЮЩАЯ КНОПКА DISCORD ========== */
.discord-btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #5865F2, #7289da);
    padding: 15px 25px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    box-shadow: 0 5px 30px rgba(88, 101, 242, 0.4);
    animation: pulse 2s infinite;
}

.discord-btn-floating:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(88, 101, 242, 0.6);
}

.discord-btn-floating i {
    font-size: 1.4rem;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 30px rgba(88, 101, 242, 0.4);
    }
    50% {
        box-shadow: 0 5px 40px rgba(88, 101, 242, 0.7);
    }
}

/* ========== HERO СЕКЦИЯ ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(230, 57, 70, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(247, 127, 0, 0.15) 0%, transparent 40%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
}

.hero-text h1 span {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-text h1 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-fire);
    border-radius: 2px;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 600px;
}

/* ========== КНОПКИ ========== */
.btn-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    background: var(--gradient-sunset);
    color: white;
    box-shadow: 0 5px 25px rgba(230, 57, 70, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(230, 57, 70, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--gradient-sunset);
    border-color: transparent;
    box-shadow: 0 8px 35px rgba(230, 57, 70, 0.5);
}

/* ========== БЛОК НОВОСТЕЙ ========== */
.news-sidebar {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.9), rgba(13, 13, 13, 0.95));
    border-radius: var(--border-radius-lg);
    padding: 25px;
    border: 1px solid rgba(230, 57, 70, 0.2);
    backdrop-filter: blur(10px);
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-glow);
}

.news-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(230, 57, 70, 0.3);
}

.news-header i {
    font-size: 1.5rem;
    color: var(--primary-orange);
}

.news-header h3 {
    font-size: 1.3rem;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.news-list {
    overflow-y: auto;
    flex: 1;
    padding-right: 10px;
}

.news-list::-webkit-scrollbar {
    width: 6px;
}

.news-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.news-list::-webkit-scrollbar-thumb {
    background: var(--gradient-sunset);
    border-radius: 3px;
}

.news-item {
    padding: 15px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-orange);
    transition: var(--transition-normal);
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-left-color: var(--primary-yellow);
    transform: translateX(5px);
}

.news-date {
    font-size: 0.8rem;
    color: var(--primary-yellow);
    margin-bottom: 5px;
    font-weight: 500;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.news-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.news-content a {
    color: var(--primary-yellow);
    text-decoration: underline;
    text-decoration-color: rgba(252, 191, 73, 0.4);
}

.news-content a:hover {
    color: var(--light-yellow);
    text-decoration-color: var(--light-yellow);
}

.loading-news,
.no-news,
.error-news {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.loading-news i {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 10px;
}

.error-news {
    color: var(--primary-red);
}

.error-news small {
    color: var(--text-muted);
}

/* ========== СЕКЦИИ ========== */
.section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-fire);
    border-radius: 2px;
}

/* ========== СЕТКА ПРОЕКТОВ ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid rgba(230, 57, 70, 0.1);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-fire);
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card), 0 0 40px rgba(230, 57, 70, 0.2);
    border-color: rgba(230, 57, 70, 0.3);
}

.project-card:hover::before {
    opacity: 1;
}

.project-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.project-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8) 100%);
}

.project-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(230, 57, 70, 0.3);
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-img::after {
    opacity: 1;
}

.banner-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--gradient-sunset);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.project-card:hover .banner-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.banner-btn:hover {
    transform: translateX(-50%) scale(1.05) !important;
    box-shadow: 0 8px 35px rgba(230, 57, 70, 0.5);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: var(--transition-normal);
}

.project-card:hover .project-info h3 {
    color: var(--primary-yellow);
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-meta i {
    color: var(--primary-orange);
}

/* ========== ФУТЕР ========== */
footer {
    background: var(--bg-darker);
    padding: 50px 0;
    border-top: 1px solid rgba(230, 57, 70, 0.2);
    position: relative;
    z-index: 1;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-fire);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo i {
    font-size: 2rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.copyright p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .news-sidebar {
        max-height: 350px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    nav ul li a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .discord-btn-header {
        padding: 8px 15px !important;
        font-size: 0.85rem;
    }
    
    /* ИСПРАВЛЕНИЕ: увеличиваем отступ сверху для hero */
    .hero {
        padding-top: 180px;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .discord-btn-floating {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }
    
    .discord-btn-floating span {
        display: none;
    }
}

@media (max-width: 480px) {
    /* ИСПРАВЛЕНИЕ: еще больше отступ для маленьких экранов */
    .hero {
        padding-top: 200px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .logo-icon {
        font-size: 1.6rem;
    }
    
    nav ul li a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .discord-btn-header {
        padding: 6px 12px !important;
        font-size: 0.8rem;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .project-img {
        height: 180px;
    }
    
    .news-sidebar {
        padding: 15px;
    }
    
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 360px) {
    /* ИСПРАВЛЕНИЕ: максимальный отступ для самых маленьких экранов */
    .hero {
        padding-top: 220px;
    }
    
    nav ul {
        gap: 5px;
    }
    
    nav ul li a {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .discord-btn-header {
        padding: 5px 10px !important;
        font-size: 0.75rem;
    }
}

/* ========== АНИМАЦИИ ПРИ ПОЯВЛЕНИИ ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text,
.hero-content,
.news-sidebar,
.project-card {
    animation: fadeInUp 0.8s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

.news-sidebar {
    animation-delay: 0.3s;
}