/* ========== RESET ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, Arial, sans-serif;
    background: #eef6f1;
    color: #1f3d2b;
}

/* ========== HEADER ========== */

.top-bar {
    display: flex;
    align-items: center;
    padding: 16px 40px;
    background: #e1f2e8;
    position: relative;
    z-index: 50;
}

.menu {
    display: flex;
    gap: 40px;
    margin: 0 auto;
}

.menu-item {
    cursor: pointer;
    padding-bottom: 4px;
    position: relative;
}

.menu-item.active {
    color: #1f7a4d;
    border-bottom: 2px solid #1f7a4d;
}

/* ========== CONTENT ========== */

.content {
    padding: 40px;
}

h1 {
    margin-bottom: 24px;
}

/* ========== CONTROLS ROW ========== */

.controls-row {
    display: flex;
    justify-content: flex-end;
    max-width: 720px;
    margin: 0 auto 24px;
}

/* ========== CARDS ========== */

.card-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.card {
    width: 720px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f1f7f4 100%
    );
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 32px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.card:hover {
    background: #d2efe1;
}

.game-placeholder {
    width: 100px;
    height: 100px;
    background: #2ecc71;
    border-radius: 16px;
    flex-shrink: 0;
}

.card-text h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.card-text p {
    color: #555;
}

/* ========== BREADCRUMB ========== */

.breadcrumb {
    margin-bottom: 12px;
    color: #4b6f5b;
    cursor: pointer;
}

.breadcrumb {
    display: inline-block;
}

/* ========== DROPDOWN ========== */

.dropdown-parent {
    position: relative;
}

/* первый уровень */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 220px;

    z-index: 100;
}

.dropdown-parent:hover > .dropdown {
    display: block;
}

/* hover-мост (БЕЗ перекрытия кликов) */
.dropdown-parent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;

    /* 🔥 КЛЮЧЕВОЕ */
    pointer-events: auto;
}

/* пункты */
.dropdown-item {
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #e6f4ec;
}

/* второй уровень (tools) */
.dropdown-item.has-children {
    position: relative;
}

.dropdown-item.has-children > .dropdown {
    display: none;
    top: 0;
    left: 100%;
    margin-left: 8px;
    z-index: 200;
}

.dropdown-item.has-children:hover > .dropdown {
    display: block;
}

/* защита от автопоказа */
.dropdown-parent:hover .dropdown .dropdown {
    display: none;
}

/* ========== THEME SWITCH ========== */

.theme-switch {
    position: fixed;
    left: 20px;
    bottom: 20px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 14px;

    background: transparent; /* ✅ как фон сайта */
    color: #6b7280;

    border-radius: 14px;
    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;

    z-index: 1000;
    user-select: none;
}
.theme-switch:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #111827;
}
body.dark .theme-switch {
    color: #d1d5db;
}

body.dark .theme-switch:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-icon {
    width: 28px;
    height: 28px;
    background: #2a2a2a;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.theme-text {
    font-size: 14px;
    opacity: 0.9;
}

.switch {
    width: 42px;
    height: 22px;
    background: #3a3a3a;
    border-radius: 999px;
    position: relative;
    transition: background 0.25s ease;
}

.switch-handle {
    width: 18px;
    height: 18px;
    background: #9ca3af;
    border-radius: 50%;

    position: absolute;
    top: 2px;
    left: 2px;

    transition: transform 0.25s ease, background 0.25s ease;
}

/* ========== DARK MODE ========== */

body.dark {
    background: #121212;
    color: #e6e6e6;
}

body.dark .top-bar {
    background: #1e1e1e;
}

body.dark .menu-item.active {
    border-bottom-color: #4ade80;
    color: #4ade80;
}

body.dark .card {
    background: #1f1f1f;
}

body.dark .card:hover {
    background: #2a2a2a;
}

body.dark .dropdown {
    background: #1f1f1f;
    color: #e6e6e6;
}

body.dark .dropdown-item:hover {
    background: #2a2a2a;
}

body.dark .switch {
    background: #22c55e;
}

body.dark .switch-handle {
    transform: translateX(20px);
    background: #ffffff;
}
/* ========== TOOL PAGE ========== */

.tool-page {
    max-width: 960px;
    margin: 40px auto 0;
}

.tool-header {
    display: flex;
    gap: 36px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    border-radius: 28px;
    margin-bottom: 32px;
}

.tool-logo {
    width: 140px;
    height: 140px;
    border-radius: 24px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tool-meta h1 {
    margin-bottom: 12px;
}

.tool-link {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 14px;
    border-radius: 10px;
    background: #e6f4ec;
    color: #1f7a4d;
    font-weight: 500;
}
/* LIGHT MODE — Website hover animation */
.tool-link {
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.tool-link:hover {
    background: #dff3ea; /* чуть темнее */
    transform: translateY(-1px);
}

.tool-socials {
    margin-top: 6px;
}

.tool-socials a {
    margin-right: 14px;
    font-size: 14px;
    color: #6b8f7a;
}

.tool-developer {
    margin-top: 10px;
    font-size: 14px;
}

.tool-guide {
    max-width: 760px;
    margin: 40px auto 0;

    text-align: left;
    font-size: 16px;
    line-height: 1.9;

    color: #243b2f; /* 🔥 читаемый тёмно-зелёно-серый */
}

.tool-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}
a {
    text-decoration: none;
}
.tool-link:hover,
.tool-socials a:hover,
.tool-developer a {
    color: #4b6f5b;          /* спокойный зелёно-серый */
    font-weight: 500;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.tool-developer a:hover {
    color: #1f7a4d;          /* фирменный зелёный AbsTools */
    opacity: 0.9;
}

body.dark .tool-header {
    background: #1b1b1b;
    border: 1px solid #2a2a2a;
}

body.dark .tool-meta h1 {
    color: #ffffff;
}

body.dark .tool-guide {
    color: #cfd6d1;
}

body.dark .tool-socials a,
body.dark .tool-developer a {
    color: #9ca3af;
}

body.dark .tool-link {
    background: #1f2937;
    color: #4ade80;
}
.tool-header {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.guide-image {
    margin: 28px 0;
    text-align: center;
}

.guide-image img {
    max-width: 100%;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.tool-guide h2 {
    margin: 32px 0 14px;
    font-size: 22px;
    font-weight: 600;
    color: #1f7a4d; /* акцент */
}
.tool-guide hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.12);
    margin: 36px 0;
}
body.dark .tool-guide hr {
    border-top: 1px solid rgba(255,255,255,0.15);
}
.tool-guide ul {
    margin: 14px 0 20px 22px;
}

.tool-guide li {
    margin-bottom: 8px;
}
.tool-guide small {
    color: #6b7280;
}
body.dark .tool-guide small {
    color: #9ca3af;
}
.game-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.card-text p {
    font-size: 14px;          /* 👈 чуть меньше шрифт */
    line-height: 1.5;
    color: #374151;           /* светлая тема */
}
body.dark .card-text p {
    color: #cbd5e1;           /* 🔥 хорошо читается на тёмном фоне */
}
body.dark .card {
    background: linear-gradient(
        135deg,
        #1b1b1b 0%,
        #242424 100%
    );
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.45);
}
.card:hover {
    transform: translateY(-2px);
}
.card {
    transition:
        background 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}
.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* ========== FOOTER ========== */

.footer-right a {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.footer-right a:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.footer-right img {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

/* DARK MODE */
body.dark .site-footer {
    background: rgba(20, 20, 20, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark .footer-left {
    color: #cbd5e1;
}

body.dark .footer-right a:hover {
    background: rgba(255, 255, 255, 0.08);
}
.site-footer {
    position: fixed;
    right: 20px;
    bottom: 16px;

    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 13px;
    color: #6b7280;
    z-index: 1000;
}

.site-footer strong {
    font-weight: 500;
}

.footer-icons {
    display: flex;
    gap: 10px;
}

.footer-icons a {
    color: #6b7280;
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.footer-icons a:hover {
    opacity: 0.7;
}

/* DARK MODE */
body.dark .site-footer {
    color: #9ca3af;
}

body.dark .footer-icons a {
    color: #9ca3af;
}

html, body {
    min-height: 100vh;
}

body {
    position: relative;
}
.site-credit {
    position: absolute;
    right: 24px;
    bottom: 18px;
    z-index: 20;

    display: flex;
    align-items: center;
    gap: 14px;

    font-size: 13px;
    color: #6b7280;
}

/* текст */
.credit-text {
    white-space: nowrap;
}

/* иконки */
.credit-icons {
    display: flex;
    gap: 10px;
}

.credit-icons a {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    transition: background .2s ease, transform .2s ease;
    color: #6b7280; /* основной цвет */
}

.credit-icons a:hover {
    background: rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.credit-icons svg {
    width: 16px;
    height: 16px;
    display: block;
}
body.dark .credit-icons a {
    color: #e5e7eb;
}

body.dark .credit-icons a:hover {
    background: rgba(255,255,255,0.12);
}
body.dark .tool-developer a {
    color: #9ca3af;
}

body.dark .tool-developer a:hover {
    color: #4ade80;
}
.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 10px;
    border-radius: 999px;

    background: rgba(31, 122, 77, 0.08);
    font-size: 13px;
    color: #355f4a;
}

.dev-badge a {
    color: #1f7a4d;
    font-weight: 600;
}

.dev-badge a:hover {
    opacity: 0.85;
}
body.dark .dev-badge {
    background: rgba(74, 222, 128, 0.12);
    color: #cbd5e1;
}

body.dark .dev-badge a {
    color: #4ade80;
}
/* =========================
   GUIDE LINKS (Video guide)
   ========================= */

.tool-guide a {
    color: #374151;                 /* тёмный графит */
    font-weight: 500;
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    transition: 
        color 0.2s ease,
        transform 0.2s ease;
}

/* ▶ иконка */
.tool-guide a::before {
    content: "▶";
    font-size: 11px;
    opacity: 0.6;
}

/* hover */
.tool-guide a:hover {
    color: #111827;                 /* чуть темнее */
    text-decoration: underline;
    transform: translateX(2px);
}

/* DARK MODE */
body.dark .tool-guide a {
    color: #d1d5db;
}

body.dark .tool-guide a:hover {
    color: #ffffff;
}
/* ===== LOGO: AbsTools ===== */

.logo {
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    letter-spacing: -0.02em;
    cursor: pointer;
    user-select: none;

    display: flex;
    align-items: center;

    transition: transform 0.2s ease, filter 0.2s ease;
}

/* Abs */
.logo-main {
    font-weight: 700;
    color: #3f6f64;
}

/* Tools */
.logo-sub {
    font-weight: 500;
    color: #6fbfa6;
    margin-left: 1px;
}

/* hover — очень тонко */
.logo:hover {
    transform: scale(1.02);
    filter: saturate(1.1);
}

/* ===== DARK MODE ===== */

body.dark .logo-main {
    color: #7fd8bc;
}

body.dark .logo-sub {
    color: #b7f0dd;
}
/* ===== DARK MODE: breadcrumb like title ===== */

body.dark .breadcrumb {
    color: #e5e7eb;          /* тот же светлый цвет, что у заголовков */
    opacity: 0.7;            /* чтобы визуально был вторичным */
}

body.dark .breadcrumb:hover {
    opacity: 1;
    text-decoration: underline;
}
/* ===== DARK MODE: Website как Developer badge ===== */

body.dark .tool-link {
    background: rgba(74, 222, 128, 0.14);   /* мягкая плашка */
    color: #4ade80;

    padding: 8px 14px;                     /* как в светлой теме */
    border-radius: 10px;                   /* 👈 ТА ЖЕ ФОРМА */
    border: none;

    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

body.dark .tool-link:hover {
    background: rgba(74, 222, 128, 0.18);
    border-color: rgba(74, 222, 128, 0.6);
    transform: translateY(-1px);
}
/* ===== Scroll To Top Button ===== */

.scroll-top {
    position: fixed;
    right: 28px;
    bottom: 76px;

    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;

    background: rgba(31, 122, 77, 0.12);
    color: #1f7a4d;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background 0.2s ease;

    z-index: 999;
}

/* visible */
.scroll-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top:hover {
    background: rgba(31, 122, 77, 0.2);
    transform: translateY(-2px);
}

/* ===== DARK MODE ===== */

body.dark .scroll-top {
    background: rgba(74, 222, 128, 0.14);
    color: #4ade80;

    box-shadow:
        0 0 0 rgba(0,0,0,0);
}

body.dark .scroll-top:hover {
    background: rgba(74, 222, 128, 0.22);
    box-shadow:
        0 8px 20px rgba(74, 222, 128, 0.25);
}

/* hover — стрелка чуть вверх */
.scroll-top::before {
    content: "";
    position: absolute;

    width: 10px;
    height: 10px;

    border-left: 3px solid currentColor;
    border-top: 3px solid currentColor;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%) rotate(45deg);
    transform-origin: center;
}
.scroll-top:hover::before {
    transform: translate(-50%, -55%) rotate(45deg);
}
.scroll-top {
    box-shadow:
        inset 0 0 0 1px rgba(31, 122, 77, 0.15),
        0 6px 18px rgba(0,0,0,0.15);
}
/* 🌞 Light mode */

.theme-icon {
    background: #ffffff;
    color: #9ca3af; /* мягкий серый */
    border: 1px solid #e5e7eb;
}

.switch {
    background: #e5e7eb;
}

.switch-handle {
    background: #ffffff;
}
/* 🌙 Dark mode */

body.dark .theme-icon {
    background: #2a2a2a;
    color: #d1d5db;
    border: 1px solid #3a3a3a;
}

body.dark .switch {
    background: #3a3a3a;
}

body.dark .switch-handle {
    background: #22c55e; /* твой фирменный зелёный */
}
.theme-switch:hover .theme-icon {
    transform: scale(1.05);
}

.theme-switch:hover .switch {
    filter: brightness(1.05);
}
#content {
    transition: opacity 0.18s ease;
}
#content.fade-out {
    opacity: 0;
}


/*  dsfsdf  */
/* ========== HOME PAGE ========== */

.home {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ===== HERO ===== */

.hero {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    border-radius: 32px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(110, 231, 183, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #e8f5f0 0%, #f0f9ff 100%);
    z-index: 0;
}

body.dark .hero-bg {
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(74, 222, 128, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 50px 20px;
}

.hero-title {
    font-family: "Manrope", system-ui, sans-serif;
    font-size: clamp(48px, 10vw, 72px);
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.title-abs {
    font-weight: 700;
    color: #2d7a5f;
}

.title-tools {
    font-weight: 500;
    color: #5cb895;
}

body.dark .title-abs {
    color: #6ee7b7;
}

body.dark .title-tools {
    color: #a7f3d0;
}

.hero-subtitle {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 32px;
}

body.dark .hero-subtitle {
    color: #94a3b8;
}

.hero-stats {
    display: flex;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.dark .stat-item {
    background: rgba(30, 30, 30, 0.7);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: #1f7a4d;
    line-height: 1;
}

body.dark .stat-number {
    color: #4ade80;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 8px;
}

body.dark .stat-label {
    color: #94a3b8;
}

/* ===== SECTIONS ===== */

.home-section {
    margin-bottom: 56px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    text-align: center;
    color: #1e293b;
}

body.dark .section-title {
    color: #f1f5f9;
}

/* ========== CAROUSEL ========== */

.carousel-container {
    width: 100%;
    max-width: 900px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    perspective: 1200px;
    overflow: visible;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    cursor: grab;
    user-select: none;
}

.carousel-track:active {
    cursor: grabbing;
}

/* ===== CARDS ===== */

.carousel-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 180px;
    margin-left: -140px;
    margin-top: -90px;
    border-radius: 20px;
    cursor: pointer;
    
    transform-style: preserve-3d;
    will-change: transform, opacity;
    transition: none;
}

.carousel-card .card-glow {
    position: absolute;
    inset: -3px;
    background: var(--gradient);
    border-radius: 23px;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.4s ease;
    z-index: -1;
}

.carousel-card.active .card-glow {
    opacity: 0.6;
}

.carousel-card .card-content {
    position: relative;
    height: 100%;
    padding: 24px;

    display: flex;
    flex-direction: column;
    justify-content: center;   /* ⬅ вертикальный центр */
    align-items: center;       /* ⬅ горизонтальный центр */
    text-align: center;        /* ⬅ текст по центру */

    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.carousel-card p {
    max-width: 220px;
}


body.dark .carousel-card .card-content {
    background: linear-gradient(145deg, #242424 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.carousel-card.active .card-content {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body.dark .carousel-card.active .card-content {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.carousel-card .card-icon {
    font-size: 32px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.carousel-card.active:hover .card-icon {
    transform: scale(1.1);
}

.carousel-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.carousel-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    flex-grow: 1;
}

body.dark .carousel-card p {
    color: #94a3b8;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .carousel-container {
        height: 240px;
    }
    
    .carousel-card {
        width: 240px;
        height: 160px;
        margin-left: -120px;
        margin-top: -80px;
    }
    
    .carousel-card .card-content {
        padding: 20px;
    }
    
    .carousel-card .card-icon {
        font-size: 28px;
    }
    
    .carousel-card h3 {
        font-size: 16px;
    }
}

/* Лупа */
/* ========== SEARCH ========== */

.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    
    background: rgba(0, 0, 0, 0.04);
    color: #6b7280;
    
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-btn svg {
    width: 16px;
    height: 16px;
}

.search-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
}

body.dark .search-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
}

body.dark .search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

/* Dropdown */
.search-dropdown {
    position: absolute;
    top: 60px;
    right: 40px;
    width: 320px;
    
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 12px;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 200;
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.dark .search-dropdown {
    background: #1f1f1f;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#searchInput {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    background: #f9fafb;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#searchInput:focus {
    border-color: #4ade80;
    background: #ffffff;
}

body.dark #searchInput {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #e5e7eb;
}

body.dark #searchInput:focus {
    border-color: #4ade80;
    background: #1f1f1f;
}

#searchInput::placeholder {
    color: #9ca3af;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-result-item:hover {
    background: #f3f4f6;
}

body.dark .search-result-item:hover {
    background: #2a2a2a;
}

.search-result-item img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.search-result-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

body.dark .search-result-info h4 {
    color: #f3f4f6;
}

.search-result-info span {
    font-size: 12px;
    color: #6b7280;
}

body.dark .search-result-info span {
    color: #9ca3af;
}

.search-empty {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ========== CUSTOM SCROLLBAR ========== */

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* DARK MODE scrollbar */
body.dark .search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

body.dark .search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Firefox */
.search-results {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

body.dark .search-results {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ========== SOCIAL ICONS DARK MODE ========== */

/* Рамка ВСЕГДА видна в тёмной теме */
body.dark .social-icon {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

/* Инверсия цвета иконок ВСЕГДА в тёмной теме */
body.dark .social-icon img,
body.dark .social-icon svg {
    filter: invert(1) brightness(0.9);
}
/* ========== SVG Icons Fix ========== */

/* Заставляем SVG использовать currentColor */
.credit-icons svg,
.credit-icons svg path {
    fill: currentColor;
}

/* Dark mode */
body.dark .credit-icons a {
    color: #d1d5db;
}

body.dark .credit-icons a:hover {
    color: #ffffff;
}

/* ========== VIEW TOGGLE ========== */

.view-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

.view-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #6b7280;
}

.view-btn.active {
    background: #1f7a4d;
    color: #ffffff;
}

/* Dark mode */
body.dark .view-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #6b7280;
}

body.dark .view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

body.dark .view-btn.active {
    background: #4ade80;
    color: #0a0a0a;
}

/* ========== LIST VIEW ========== */

.card-list.list-view {
    gap: 8px;
}

.card-list.list-view .card {
    width: 100%;
    max-width: 720px;
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
    border-radius: 12px;
    gap: 14px;
}

.card-list.list-view .tool-icon,
.card-list.list-view .game-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.card-list.list-view .card-text {
    flex: 1;
    min-width: 0;
}

.card-list.list-view .card-text h3 {
    font-size: 15px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Скрываем описание в списке */
.card-list.list-view .card-text p {
    display: none;
}

/* ========== GRID VIEW (default cards) ========== */

.card-list.grid-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.card-list.grid-view .card {
    width: 720px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 800px) {
    .card-list.grid-view .card,
    .card-list.list-view .card {
        width: 100%;
        max-width: 100%;
    }
    
    .search-row {
        flex-wrap: wrap;
    }
}



/* ===== LIST LINK ICON ===== */

.list-link {
    display: none; /* ❌ скрыта по умолчанию */
}

/* Показываем ТОЛЬКО в list-view */
.card-list.list-view .list-link {
    display: flex;

    width: 32px;
    height: 32px;

    align-items: center;
    justify-content: center;

    border-radius: 8px;
    margin-left: auto;

    color: #6b7280;
    font-size: 16px;

    transition: 
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.card-list.list-view .list-link:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #1f7a4d;
    transform: translateY(-1px);
}

/* Dark mode */
body.dark .card-list.list-view .list-link {
    color: #9ca3af;
}

body.dark .card-list.list-view .list-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #4ade80;
}

/* ===== LOGO ICON ===== */

.logo {
    display: flex;
    align-items: center;
    gap: 8px; /* расстояние между иконкой и текстом */
}

.logo-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

/* hover синхронно с текстом */
.logo:hover .logo-icon {
    transform: scale(1.05);
}
.logo-text {
    display: inline-flex;
    align-items: center;
}

body.dark .logo-icon {
    content: url("images/logo-dark.png");
}
/* ===== TERMS LINK (same as developer name) ===== */

.terms-link {
    font-size: 13px;
    color: inherit;          /* 👈 КЛЮЧЕВОЕ */
    font-weight: 500;        /* как у CryptoCactus */
    white-space: nowrap;
    transition: opacity 0.2s ease, text-decoration 0.2s ease;
}

.terms-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}
body.dark .terms-link {
    color: inherit;
}




