:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --header-border: rgba(255, 255, 255, 0.05);
    --header-scrolled-bg: rgba(10, 10, 10, 0.7);
    --accent: #8c7ae6;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(-45deg, #000000, #0a0a0a, #000000, #0d0d0d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-color);
    margin: 0;
    font-family: 'Inter', sans-serif;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(-45deg, #f5f5f5, #e0e0e0, #f5f5f5, #ffffff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    opacity: 0;
    z-index: -2;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

body.light-theme {
    --bg-color: #f5f5f5;
    --text-color: #111111;
    --header-border: rgba(0, 0, 0, 0.05);
    --header-scrolled-bg: rgba(255, 255, 255, 0.8);
}

body.light-theme::before {
    opacity: 1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.logo {
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    white-space: nowrap;
    z-index: 10;
    transition: color 0.5s ease;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.container {
    width: 95%;
    max-width: 1234px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease, border-color 0.5s ease;
    box-sizing: border-box;
}

.nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 1;
}

.nav-item {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    opacity: 0.7;
    padding: 8px 16px;
    position: relative;
    z-index: 2;
    transition: color 0.5s ease, opacity 0.3s ease;
}

.nav-item:hover {
    opacity: 1;
}

.nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

body.light-theme .nav-indicator {
    background: rgba(0, 0, 0, 0.05);
}

.header.scrolled {
    padding: 0; 
    transform: translateY(20px);
}

.header.scrolled .header-content {
    background: var(--header-scrolled-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    border: 1px solid var(--header-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 10px;
    border-radius: 50%;
    transition: 0.3s;
    display: flex;
    align-items: center;
    z-index: 10;
}

.theme-toggle:hover { background: rgba(255,255,255,0.05); }

.theme-toggle i {
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.26, 1.55);
}

body.light-theme .theme-toggle i {
    transform: rotate(360deg);
}

.theme-icon-light { display: none; }
body.light-theme .theme-icon-dark { display: none; }
body.light-theme .theme-icon-light { display: block; }

.main-content {
    flex: 1 0 auto;
    padding-top: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.tab-content { display: none; width: 100%; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

#home-content .hero {
    margin-top: 60px;
    text-align: center;
}

.hero-title {
    font-size: 72px;
    font-weight: 800;
    margin: 0;
    color: var(--text-color);
    letter-spacing: -2px;
    min-height: 80px;
    white-space: pre-wrap;
}

.hero-title span {
    opacity: 0;
    transform: translateY(10px);
    display: inline-block;
    animation: fadeLetter 0.5s ease forwards;
}

@keyframes fadeLetter {
    to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-color);
    opacity: 0;
    margin-top: 10px;
    font-weight: 400;
    animation: fadeUp 0.8s ease forwards 0.8s;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 0.5; transform: translateY(0); }
}

.btn-primary {
    display: inline-block;
    background: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 16px 40px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin-top: 40px;
    outline: none;
    opacity: 0;
    animation: fadeUpBtn 0.8s ease forwards 1.4s, glowPulse 2.5s infinite ease-in-out 2.2s;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-primary:hover {
    opacity: 1;
    transform: translateY(0) scale(1.08) !important;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5) !important;
    letter-spacing: 3px;
}

.btn-primary:active {
    transform: translateY(0) scale(1.02) !important;
}

@keyframes fadeUpBtn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(255, 255, 255, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

body.light-theme .btn-primary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    animation: fadeUpBtn 0.8s ease forwards 1.4s, glowPulseLight 2.5s infinite ease-in-out 2.2s;
}

body.light-theme .btn-primary:hover {
    opacity: 1;
    background: #000000;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(0) scale(1.08) !important;
}

@keyframes glowPulseLight {
    0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(0, 0, 0, 0.15); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.script-header { margin-bottom: 40px; text-align: center; }
.section-title { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.section-subtitle { opacity: 0.5; font-size: 16px; margin: 0; }

.script-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.intro-img-wrapper, .ss-item {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--header-border);
    background: rgba(255,255,255,0.02);
    transition: transform 0.3s ease;
}

.intro-img-wrapper:hover, .ss-item:hover { transform: translateY(-5px); }

.intro-img-wrapper img, .ss-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.copy-box {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 60px;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.copy-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    transition: color 0.5s ease;
}

.copy-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 0;
    width: 130px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover { background: rgba(255, 255, 255, 0.1); }
.copy-btn i { width: 16px; height: 16px; }

.code-area {
    background: #1e1e1e;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.5);
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

.code-area span { transition: color 0.5s ease; }
.syn-punct { color: #d4d4d4; }
.syn-func { color: #dcdcaa; }
.syn-obj { color: #9cdcfe; }
.syn-str { color: #ce9178; }

body.light-theme .copy-box { background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(0, 0, 0, 0.1); }
body.light-theme .copy-box-header { color: rgba(0, 0, 0, 1); }
body.light-theme .copy-btn { border: 1px solid rgba(0, 0, 0, 0.2); }
body.light-theme .copy-btn:hover { background: rgba(0, 0, 0, 0.05); }
body.light-theme .code-area { background: #f3f3f3; border: 1px solid rgba(0, 0, 0, 0.1); }
body.light-theme .syn-punct { color: #333333; }
body.light-theme .syn-func { color: #795e26; }
body.light-theme .syn-obj { color: #0070c1; }
body.light-theme .syn-str { color: #a31515; }

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: zoom 0.3s ease;
}

@keyframes zoom { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    user-select: none;
}

.lightbox-close { top: 30px; right: 40px; }
.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }

.about-wrapper {
    display: flex;
    gap: 40px;
    align-items: stretch;
    width: 100%;
    margin-bottom: 40px;
}

.about-left {
    flex: 1;
    max-width: 625px;
    display: flex;
    flex-direction: column;
}

.about-slideshow {
    position: relative;
    width: 100%;
    flex: 1;
    aspect-ratio: 623 / 592;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2); 
    background: rgba(255, 255, 255, 0.04); 
    backdrop-filter: blur(10px);
}

.about-slide {
    position: absolute;
    top: 24px;
    left: 24px;
    width: calc(100% - 48px);
    height: calc(100% - 48px);
    object-fit: cover;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.about-slide.active { opacity: 1; }

.about-right {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-text-content { text-align: left; }
.about-intro { max-width: 100%; margin: 0 0 20px; }
.about-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 400;
}

.social-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.custom-social-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 15, 15, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 24px;
    color: var(--text-color);
    transition: all 0.4s ease;
    width: 100%;
    box-sizing: border-box; 
    backdrop-filter: blur(10px);
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    outline: none;
    text-decoration: none !important;
}

.custom-social-btn.discord-btn:hover {
    background: rgba(88, 101, 242, 0.05);
    border-color: rgba(88, 101, 242, 0.4);
    transform: translateY(-3px);
}

.custom-social-btn.telegram-btn:hover {
    background: rgba(0, 136, 204, 0.05);
    border-color: rgba(0, 136, 204, 0.4);
    transform: translateY(-3px);
}

.custom-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
}

.discord-icon { background-image: url('https://cdn-icons-png.freepik.com/512/2582/2582637.png'); }
.telegram-icon { background-image: url('https://icones.pro/wp-content/uploads/2021/04/icone-telegramme-symbole-logo-gris.png'); }

.cd-left { display: flex; align-items: center; gap: 15px; }
.cd-left i { width: 28px; height: 28px; opacity: 0.9; }
.cd-text { display: flex; flex-direction: column; }
.cd-title { font-weight: 600; font-size: 15px; letter-spacing: 0.5px; }
.cd-subtitle { font-size: 12px; opacity: 0.5; }
.cd-status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; opacity: 0.8; }
.cd-status i { width: 16px; height: 16px; }

body.light-theme .custom-social-btn {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

body.light-theme .custom-icon {
    filter: brightness(0);
}

.stats-and-features-container {
    width: 100%;
    margin-top: 60px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.status-card {
    background: rgba(255, 255, 255, 0.04); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.status-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.status-card i {
    width: 36px;
    height: 36px;
    opacity: 0.8;
    transition: all 0.4s ease;
}
.status-title {
    font-size: 14px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.status-value {
    font-size: 24px;
    font-weight: 700;
    display: block;
}

.text-success { 
    color: #4ade80; 
}
.text-warning { 
    color: #fbbf24; 
}

.status-grid .status-card:nth-child(1):hover {
    border-color: #4ade80;
    box-shadow: 0 10px 40px rgba(74, 222, 128, 0.2);
    transform: translateY(-5px);
}
.status-grid .status-card:nth-child(1):hover i {
    color: #4ade80;
    opacity: 1;
    transform: scale(1.1);
}

.status-grid .status-card:nth-child(2):hover {
    border-color: #ffffff;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}
.status-grid .status-card:nth-child(2):hover i {
    color: #ffffff;
    opacity: 1;
    transform: scale(1.1);
}

.status-grid .status-card:nth-child(3):hover {
    border-color: #fbbf24;
    box-shadow: 0 10px 40px rgba(251, 191, 36, 0.2);
    transform: translateY(-5px);
}
.status-grid .status-card:nth-child(3):hover i {
    color: #fbbf24;
    opacity: 1;
    transform: scale(1.1);
}

.mini-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mini-feature {
    background: rgba(15, 15, 15, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mini-feature:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.mini-feature i {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

body.light-theme .status-card,
body.light-theme .mini-feature {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

body.light-theme .status-card:hover,
body.light-theme .mini-feature:hover {
    border-color: rgba(0, 0, 0, 0.3);
}

body.light-theme .about-slideshow {
    background: rgba(0, 0, 0, 0.03); 
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .status-grid .status-card:nth-child(2):hover {
    border-color: #000000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); /* Мягкая темная тень */
}
body.light-theme .status-grid .status-card:nth-child(2):hover i {
    color: #000000;
}

.code-area, .code-area *, .hero-title, .section-title {
    user-select: text !important;
    -webkit-user-select: text !important;
}

.footer {
    flex-shrink: 0;
    width: 100%;
    padding: 20px 0;
    background: transparent;
}

.copyright {
    text-align: center;
    font-size: 11px;
    font-weight: 200;
    color: var(--text-color);
    opacity: 0.2;
    letter-spacing: 2px;
    text-transform: uppercase;
    pointer-events: none;
}

@media (max-width: 992px) {
    .about-wrapper { flex-direction: column; align-items: center; }
    .about-left { max-width: 100%; width: 100%; }
    .status-grid { grid-template-columns: 1fr; }
    .mini-features-grid { grid-template-columns: 1fr; }
    .about-slideshow {
        flex: none;
        aspect-ratio: 623 / 592;
        height: auto;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        height: auto !important;
        padding: 15px 20px !important;
        width: 100% !important; 
        max-width: 100%;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .main-content {
        padding-top: 150px; 
    }
    
    .hero-title {
        font-size: 42px;
    }
    .logo { flex: 1; margin: 0 !important; justify-content: flex-start; }
    .logo span { position: absolute; left: 50%; transform: translateX(-50%); }
    .theme-toggle { order: 2; padding: 0 !important; }
    .nav {
        order: 3;
        flex-basis: 100%;
        position: relative !important;
        transform: none !important;
        left: auto !important;
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 15px;
        padding-bottom: 5px;
    }
    .header.scrolled { padding: 10px 0; }
    .header.scrolled .header-content {
        width: 92% !important;
        padding: 15px 20px !important; 
        border-radius: 20px;
        transform: translateY(10px);
    }
    .script-intro-grid, .screenshots-grid { grid-template-columns: 1fr; }
    .about-slide {
        top: 10px;
        left: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
    }
}

@media (max-width: 500px) {
    .custom-social-btn { padding: 14px 16px; }
    .cd-title { font-size: 14px; }
    .cd-subtitle { font-size: 11px; }
    .cd-status { font-size: 12px; }
    .cd-left i { width: 24px; height: 24px; }
}