:root {
    --bg-color: #0a0a0f;
    --card-bg: rgba(20, 20, 30, 0.6);
    --border-color: rgba(0, 240, 255, 0.15);
    --text-main: #e0e0e0;
    --text-muted: #888;
    --accent-cyan: #00f0ff;
    --accent-pink: #ff007f;
    --success: #00e676;
    --danger: #ff1744;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, #12121c, var(--bg-color));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.logo span { color: var(--accent-pink); text-shadow: 0 0 10px rgba(255, 0, 127, 0.4); }

.nav-btns button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    margin-left: 20px;
    cursor: pointer;
    transition: 0.3s;
    padding-bottom: 5px;
}

.nav-btns button:hover { color: var(--text-main); }
.nav-btns button.active {
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.container { width: 100%; max-width: 1200px; padding: 0 20px; }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
th { color: var(--text-muted); font-weight: normal; }
.up { color: var(--success); text-shadow: 0 0 8px rgba(0,230,118,0.5); }
.down { color: var(--danger); text-shadow: 0 0 8px rgba(255,23,68,0.5); }
.leader { color: #ffd700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); font-weight: bold; }

/* === ДИЗАЙН ССЫЛОК === */
.link-container {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
    margin-bottom: 10px;
}

.link-container:hover { border-color: var(--accent-cyan); }

.link-text {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    line-height: 1.4;
}

.link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-container:hover .link-overlay { opacity: 1; }

.link-overlay.success {
    background: rgba(0, 230, 118, 0.2);
    color: var(--success);
    opacity: 1;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* === СТИЛИ ГАЙДОВ === */
.toc-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}
.toc-list li {
    margin-bottom: 12px;
}
.toc-list a {
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.3);
    font-size: 1rem;
}
.toc-list a:hover {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

.guide-step {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.guide-step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.guide-step h4 { color: var(--accent-cyan); margin-bottom: 10px; font-size: 1.1rem; }

/* Карусель для фоток */
.image-gallery {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    margin-top: 15px;
    scroll-snap-type: x mandatory;
}
.image-gallery img {
    scroll-snap-align: center;
    flex: 0 0 85%;
    max-width: 600px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.download-link {
    display: inline-block;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 10px;
    border: 1px solid var(--accent-cyan);
    transition: 0.3s;
}
.download-link:hover { background: var(--accent-cyan); color: #000; }

/* === АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        margin-bottom: 20px;
    }
    .nav-btns {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 5px;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .nav-btns button {
        margin-left: 0;
        padding: 8px 10px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 15px;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    .nav-btns button.active {
        background: rgba(0, 240, 255, 0.15);
        border-bottom: none;
        text-shadow: none;
    }
    .grid-2 { grid-template-columns: 1fr; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
    th, td { padding: 10px 8px; font-size: 0.85rem; }
    h3 { font-size: 1.1rem; }
    .card { padding: 15px; }
    .link-text { font-size: 0.65rem; padding-bottom: 25px; }
    .link-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 240, 255, 0.2) 0%, transparent 100%);
        align-items: flex-end;
        padding-bottom: 8px;
        font-size: 0.75rem;
        text-shadow: 0 1px 3px rgba(0,0,0,0.8);
        backdrop-filter: none;
    }
    .link-overlay.success {
        align-items: center;
        padding-bottom: 0;
        background: rgba(0, 230, 118, 0.2);
        backdrop-filter: blur(2px);
        font-size: 0.9rem;
    }
    .chart-container { height: 250px; }
}