﻿/* ============================================================
   Tubelovecc — Global Stylesheet
   Modern dark tech theme: deep navy + electric blue / cyan / violet
   ============================================================ */

/* --- CSS Variables & Theme (dark-first) --- */
:root {
    --brand: #38BDF8;
    --brand-light: #22D3EE;
    --brand-glow: rgba(56, 189, 248, 0.35);
    --accent: #8B5CF6;
    --accent-2: #22D3EE;
    --grad-brand: linear-gradient(135deg, #38BDF8 0%, #22D3EE 45%, #8B5CF6 100%);
    --grad-icon-1: linear-gradient(135deg, #38BDF8, #0EA5E9);
    --grad-icon-2: linear-gradient(135deg, #8B5CF6, #7C3AED);
    --grad-icon-3: linear-gradient(135deg, #22D3EE, #06B6D4);
    --grad-icon-4: linear-gradient(135deg, #34D399, #059669);
    --grad-icon-5: linear-gradient(135deg, #FBBF24, #F59E0B);
    --grad-icon-6: linear-gradient(135deg, #F87171, #DC2626);

    --bg: #070B14;
    --bg-soft: #0B1020;
    --surface: #0D1424;
    --surface-2: #111A2E;
    --surface-hover: #16213A;
    --text: #E6EDF7;
    --text-secondary: #9AA8BC;
    --text-muted: #5D6B82;
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.28);
    --success: #34D399;
    --warning: #FBBF24;
    --error: #F87171;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 60px rgba(56, 189, 248, 0.08);
    --shadow-glow: 0 0 24px var(--brand-glow);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --transition: 0.2s ease;
}

/* Light theme kept for the theme toggle */
[data-theme="light"] {
    --brand: #0EA5E9;
    --brand-light: #06B6D4;
    --brand-glow: rgba(14, 165, 233, 0.25);
    --accent: #8B5CF6;
    --accent-2: #06B6D4;
    --bg: #F6F8FC;
    --bg-soft: #EEF2F9;
    --surface: #FFFFFF;
    --surface-2: #F8FAFD;
    --surface-hover: #EEF3FA;
    --text: #0F172A;
    --text-secondary: #55637A;
    --text-muted: #8494AB;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.14);
    --shadow-glow: 0 0 0 4px var(--brand-glow);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(56, 189, 248, 0.12), transparent 60%),
        radial-gradient(800px 500px at -10% 20%, rgba(139, 92, 246, 0.12), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-light); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: rgba(56, 189, 248, 0.35); color: #fff; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--surface-hover); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* --- Container --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }

/* --- Header --- */
header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(7, 11, 20, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease;
}
[data-theme="light"] header { background: rgba(246, 248, 252, 0.82); }

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 1.5rem;
}

.logo {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 700; font-size: 1.3rem; color: var(--text);
    white-space: nowrap; letter-spacing: -0.02em;
}
.logo-icon {
    width: 38px; height: 38px;
    background: var(--grad-brand);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.05rem;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.35);
}

.nav-links { display: flex; align-items: center; gap: 0.3rem; list-style: none; }
.nav-links a {
    padding: 0.45rem 0.8rem; border-radius: 10px;
    font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
    transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    color: #7DD3FC; background: rgba(56, 189, 248, 0.1);
}

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.theme-btn, .menu-btn {
    width: 38px; height: 38px; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text); cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.theme-btn:hover, .menu-btn:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow-glow); }
.menu-btn { display: none; }

/* --- Hero --- */
.hero {
    padding: 4rem 0 3rem; text-align: center;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}
.hero h1 { margin-bottom: 0.8rem; }
.hero h1 span {
    background: linear-gradient(100deg, #38BDF8, #22D3EE 50%, #A78BFA);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { color: var(--text-secondary); max-width: 640px; margin: 0 auto 1.5rem; font-size: 1.05rem; }

.search-box {
    max-width: 500px; margin: 0 auto; position: relative;
}
.search-box input {
    width: 100%; padding: 0.85rem 1.2rem 0.85rem 2.8rem;
    border: 1px solid var(--border); border-radius: 50px;
    background: var(--surface); color: var(--text);
    font-size: 1rem; outline: none; transition: all var(--transition);
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.search-box i {
    position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 1rem; pointer-events: none;
}

/* --- Category Pills --- */
.category-nav {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    justify-content: center; padding: 1.5rem 0;
}
.cat-pill {
    padding: 0.45rem 1.1rem; border-radius: 50px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-secondary); font-size: 0.85rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition);
}
.cat-pill:hover, .cat-pill.active {
    background: var(--grad-brand); color: #fff; border-color: transparent;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.35);
}

/* --- Tool Grid --- */
.tools-section { padding: 2rem 0 4rem; }
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-header h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 0.6rem; }
.section-header .count { color: var(--text-muted); font-size: 0.9rem; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}

.tool-card {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.5rem;
    transition: all 0.25s ease; cursor: pointer;
    display: flex; flex-direction: column; gap: 0.7rem;
    position: relative; overflow: hidden;
}
.tool-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--grad-brand);
    opacity: 0; transition: opacity 0.3s ease;
}
.tool-card::after {
    content: ''; position: absolute; inset: -40% -20% auto -20%;
    height: 200px; background: radial-gradient(closest-side, rgba(56, 189, 248, 0.14), transparent);
    opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg); border-color: rgba(56, 189, 248, 0.45);
}
.tool-card:hover::before, .tool-card:hover::after { opacity: 1; }

.tool-card .tool-icon {
    width: 48px; height: 48px; border-radius: var(--radius);
    background: var(--grad-icon-1);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}
.tool-card:nth-child(2n) .tool-icon { background: var(--grad-icon-2); box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3); }
.tool-card:nth-child(3n) .tool-icon { background: var(--grad-icon-3); box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3); }
.tool-card:nth-child(4n) .tool-icon { background: var(--grad-icon-4); box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3); }
.tool-card:nth-child(5n) .tool-icon { background: var(--grad-icon-5); box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3); }
.tool-card:nth-child(6n) .tool-icon { background: var(--grad-icon-6); box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3); }

.tool-card .tool-name { font-weight: 700; font-size: 1.05rem; }
.tool-card .tool-desc { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.5; }
.tool-card .tool-meta {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: auto; padding-top: 0.5rem;
}
.tool-card .tool-tag {
    font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 50px;
    background: var(--surface-hover); color: var(--text-muted);
    font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}

/* --- Tool Page Layout --- */
.tool-page {
    max-width: 900px; margin: 0 auto; padding: 2rem 24px 4rem;
}
.tool-page .breadcrumb {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.tool-page .breadcrumb a { color: var(--text-secondary); }
.tool-page .breadcrumb a:hover { color: var(--brand); }
.tool-page .breadcrumb span { color: var(--text-muted); }

.tool-page h1 { margin-bottom: 0.5rem; }
.tool-page .tool-subtitle { color: var(--text-secondary); margin-bottom: 2rem; }

.tool-workspace {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

/* Form elements for tools */
.tool-workspace label {
    display: block; font-weight: 600; font-size: 0.9rem;
    margin-bottom: 0.4rem; color: var(--text);
}
.tool-workspace textarea, .tool-workspace input[type="text"],
.tool-workspace input[type="url"], .tool-workspace select {
    width: 100%; padding: 0.75rem 1rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-soft); color: var(--text); font-size: 0.95rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    outline: none; transition: border-color var(--transition);
    resize: vertical;
}
.tool-workspace textarea:focus, .tool-workspace input:focus, .tool-workspace select:focus {
    border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.7rem 1.5rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    border: none; transition: all var(--transition);
    text-decoration: none;
}
.btn-primary {
    background: var(--grad-brand); color: #fff;
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 0 0 3px var(--brand-glow), 0 8px 20px rgba(56, 189, 248, 0.3); color: #fff; }
.btn-secondary {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--brand); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

/* --- Tool Info / Tutorial Section --- */
.tool-info {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem;
    line-height: 1.8;
}
.tool-info h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.tool-info h3 { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }
.tool-info p { margin-bottom: 1rem; color: var(--text-secondary); }
.tool-info ul, .tool-info ol { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-secondary); }
.tool-info li { margin-bottom: 0.4rem; }
.tool-info code {
    background: var(--surface-hover); padding: 0.15rem 0.4rem;
    border-radius: 4px; font-size: 0.88em; font-family: 'JetBrains Mono', monospace;
    color: #7DD3FC;
}

/* --- FAQ --- */
.faq-section { margin-top: 2rem; }
.faq-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 0.6rem; overflow: hidden;
    background: var(--surface);
}
.faq-q {
    padding: 1rem 1.2rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    user-select: none; transition: background var(--transition);
}
.faq-q:hover { background: var(--surface-hover); }
.faq-q::after { content: '+'; font-size: 1.3rem; color: var(--text-muted); transition: transform 0.3s ease; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a {
    padding: 0 1.2rem 1rem; color: var(--text-secondary);
    display: none; line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* --- Blog / Content Pages --- */
.content-page {
    max-width: 800px; margin: 0 auto; padding: 3rem 24px 4rem;
}
.content-page h1 { margin-bottom: 1rem; }
.content-page .updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2rem; }
.content-page h2 { margin: 2rem 0 0.8rem; }
.content-page p { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.8; }

/* --- Footer --- */
footer {
    margin-top: auto; border-top: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    padding: 3rem 0 2rem;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem; margin-bottom: 2rem;
}
.footer-brand h3 { margin-bottom: 0.6rem; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 0.8rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--brand); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem; text-align: center;
    font-size: 0.85rem; color: var(--text-muted);
}

/* --- Toast / Copy feedback --- */
.toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    background: linear-gradient(135deg, #0EA5E9, #8B5CF6); color: #fff;
    padding: 0.75rem 1.2rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.9rem;
    box-shadow: var(--shadow-lg); display: none;
}
.toast.show { display: block; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Responsive --- */
@media (max-width: 768px) {
    .menu-btn { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg-soft); border-bottom: 1px solid var(--border-strong);
        flex-direction: column; padding: 1rem; gap: 0.3rem;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.active { display: flex; }
    .nav-links a { width: 100%; padding: 0.7rem 1rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding: 2.5rem 0 2rem; }
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .tool-workspace { padding: 1.2rem; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .header-inner { gap: 0.5rem; }
    .logo { font-size: 1.1rem; }
}
/* --- Print --- */
@media print {
    header, footer, .btn-row, .breadcrumb { display: none; }
    .tool-page { padding: 0; }
    body { font-size: 12pt; }
}
