/* ============================================
   TuberoYiyo - Premium Glassmorphism Theme
   ============================================ */

/* === CSS VARIABLES === */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3e;
    --glass-bg: rgba(255,255,255,0.04);
    --glass-bg-hover: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.08);
    --glass-border-hover: rgba(255,255,255,0.15);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.4);
    --glass-blur: 20px;
    --primary: #00d4ff;
    --primary-rgb: 0,212,255;
    --secondary: #7b2ff7;
    --secondary-rgb: 123,47,247;
    --accent: #00ff88;
    --accent-rgb: 0,255,136;
    --danger: #ff4757;
    --warning: #ffa502;
    --success: #2ed573;
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.65);
    --text-muted: rgba(255,255,255,0.4);
    --glow-primary: 0 0 20px rgba(0,212,255,0.3);
    --glow-secondary: 0 0 20px rgba(123,47,247,0.3);
    --glow-accent: 0 0 20px rgba(0,255,136,0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --z-nav: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
    --nav-height: 70px;
}

/* Light Mode */
.light-mode {
    --bg-primary: #e8eaf6;
    --bg-secondary: #f5f5ff;
    --bg-tertiary: #ffffff;
    --glass-bg: rgba(255,255,255,0.6);
    --glass-bg-hover: rgba(255,255,255,0.8);
    --glass-border: rgba(0,0,0,0.08);
    --glass-border-hover: rgba(0,0,0,0.15);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26,26,46,0.7);
    --text-muted: rgba(26,26,46,0.4);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.device-mobile body {
    -webkit-tap-highlight-color: rgba(var(--primary-rgb),0.18);
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.android-webview body {
    padding-bottom: 122px;
}

.device-desktop .main-content {
    min-height: 60vh;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

::selection { background: var(--primary); color: #000; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === BACKGROUND PARTICLES === */
.bg-particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(var(--primary-rgb),0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(var(--secondary-rgb),0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(var(--accent-rgb),0.03) 0%, transparent 50%);
}

/* === CONTAINER === */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* === GLASS PANEL === */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}
.glass-panel:hover {
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-hover);
}

/* === NAVIGATION === */
.main-nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-height); z-index: var(--z-nav);
    border-radius: 0; border-top: none; border-left: none; border-right: none;
    border-bottom: 1px solid rgba(var(--primary-rgb),0.2);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3), 0 1px 0 rgba(var(--primary-rgb),0.1);
}
.nav-container {
    max-width: 100%; margin: 0 auto; padding: 0 18px; gap: 12px;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 800; font-family: var(--font-display); flex: 0 0 auto; }
.logo-icon { font-size: 1.8rem; }
.logo-text { color: var(--text-primary); }
.text-accent { color: var(--primary); }
.text-glow { text-shadow: 0 0 20px rgba(var(--primary-rgb),0.5); }

.nav-menu {
    list-style: none; display: flex; gap: 4px; align-items: center;
    min-width: 0; flex: 1 1 auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.nav-menu::-webkit-scrollbar { display: none; }
.nav-menu a {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 0.84rem; font-weight: 500;
    transition: var(--transition); white-space: nowrap;
}
.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary); background: rgba(var(--primary-rgb),0.1);
}
.nav-icon { font-size: 1rem; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn-icon {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-secondary); cursor: pointer; font-size: 1.1rem;
    transition: var(--transition);
}
.btn-icon:hover { color: var(--primary); border-color: var(--primary); background: rgba(var(--primary-rgb),0.1); }

.theme-toggle .icon-sun { display: none; }
.light-mode .theme-toggle .icon-sun { display: inline; }
.light-mode .theme-toggle .icon-moon { display: none; }

.lang-selector select {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-primary); padding: 6px 10px; border-radius: var(--radius-sm);
    font-size: 0.8rem; cursor: pointer; outline: none;
}

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text-primary); transition: var(--transition); border-radius: 2px; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius-sm);
    font-family: var(--font-primary); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; border: 1px solid transparent;
    transition: var(--transition); position: relative; overflow: hidden;
    text-decoration: none; white-space: nowrap;
}
.btn::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; border-radius: 50%;
    background: rgba(255,255,255,0.2); transform: translate(-50%,-50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}
.btn:active::after { width: 300px; height: 300px; opacity: 1; transition: 0s; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb),0.7));
    color: #000; border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb),0.2);
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 25px rgba(var(--primary-rgb),0.4), 0 8px 25px rgba(0,0,0,0.3);
    color: #000;
}
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), rgba(var(--secondary-rgb),0.7));
    color: #fff; border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(var(--secondary-rgb),0.2);
}
.btn-secondary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 25px rgba(var(--secondary-rgb),0.4); color: #fff; }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb),0.7));
    color: #000; border-color: var(--accent);
}
.btn-accent:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 25px rgba(var(--accent-rgb),0.4); color: #000; }

.btn-glass {
    background: var(--glass-bg); color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-glass:hover {
    background: var(--glass-bg-hover); border-color: var(--primary);
    color: var(--primary); transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

/* === HERO === */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; padding: calc(var(--nav-height) + 40px) 20px 60px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hero-gradient {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(var(--primary-rgb),0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(var(--secondary-rgb),0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(var(--accent-rgb),0.05) 0%, transparent 60%);
}
.hero-grid-lines {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(var(--primary-rgb),0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--primary-rgb),0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
    0% { transform: translate(0,0); }
    100% { transform: translate(60px,60px); }
}

.hero-content { position: relative; z-index: 1; text-align: center; max-width: 900px; }

.hero-badge {
    display: inline-block; margin-bottom: 20px;
}
.badge-glow {
    display: inline-block; padding: 8px 24px; border-radius: 50px;
    background: rgba(var(--primary-rgb),0.1); border: 1px solid rgba(var(--primary-rgb),0.3);
    color: var(--primary); font-size: 0.85rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 900;
    margin-bottom: 20px; letter-spacing: 0.05em;
    text-shadow: 0 0 40px rgba(var(--primary-rgb),0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem); color: var(--text-secondary);
    max-width: 700px; margin: 0 auto 30px; line-height: 1.7;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; margin-bottom: 50px; }

.hero-stats {
    display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
    display: block; font-size: 2.5rem; font-weight: 900;
    font-family: var(--font-display); color: var(--primary);
    text-shadow: var(--glow-primary);
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* === SECTIONS === */
.section { padding: 80px 0; position: relative; z-index: 1; }

.section-header { margin-bottom: 50px; }
.section-badge {
    display: inline-block; padding: 5px 16px; border-radius: 50px;
    background: rgba(var(--primary-rgb),0.1); border: 1px solid rgba(var(--primary-rgb),0.2);
    color: var(--primary); font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 15px;
}
.section-title { margin-bottom: 15px; }
.section-subtitle { color: var(--text-secondary); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* === PAGE HEADER === */
.page-header {
    padding: calc(var(--nav-height) + 50px) 0 40px;
    background: linear-gradient(180deg, rgba(var(--primary-rgb),0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--glass-border);
    position: relative; z-index: 1;
}
.page-header-sm { padding-bottom: 20px; }
.page-title { margin-bottom: 10px; }
.page-subtitle { color: var(--text-secondary); font-size: 1.05rem; }

/* === GRID === */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === CARDS === */
.feature-card {
    padding: 30px; text-align: center;
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--glow-primary), var(--glass-shadow); }
.feature-icon { font-size: 2.5rem; margin-bottom: 15px; }
.feature-title { font-size: 1.1rem; margin-bottom: 10px; color: var(--text-primary); }
.feature-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.feature-link { display: inline-block; margin-top: 12px; color: var(--primary); font-weight: 600; font-size: 0.85rem; }

/* Tool Cards */
.tool-card {
    display: flex; flex-direction: column; padding: 0; overflow: hidden;
    text-decoration: none; color: var(--text-primary); cursor: pointer;
}
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--glow-primary), var(--glass-shadow); color: var(--text-primary); }
.tool-card-icon {
    height: 140px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.08), rgba(var(--secondary-rgb),0.08));
    border-bottom: 1px solid var(--glass-border);
}
.tool-card-icon img { max-height: 80px; max-width: 80px; object-fit: contain; }
.tool-icon-placeholder { font-size: 3rem; }
.tool-card-body { padding: 20px; flex: 1; }
.tool-card-title { font-size: 1rem; margin-bottom: 8px; }
.tool-card-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; }
.tool-card-footer { padding: 15px 20px; border-top: 1px solid var(--glass-border); }
.tool-keywords { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* Category badges */
.tool-category {
    display: inline-block; padding: 3px 10px; border-radius: 50px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 8px;
}
.cat-a { background: rgba(var(--primary-rgb),0.15); color: var(--primary); }
.cat-b { background: rgba(var(--secondary-rgb),0.15); color: var(--secondary); }
.cat-c { background: rgba(var(--accent-rgb),0.15); color: var(--accent); }
.cat-d { background: rgba(255,165,2,0.15); color: var(--warning); }
.badge-lg { font-size: 0.85rem; padding: 6px 16px; }

/* Tags */
.tag {
    display: inline-block; padding: 4px 12px; border-radius: 50px;
    background: rgba(var(--primary-rgb),0.1); color: var(--primary);
    font-size: 0.75rem; font-weight: 500;
}
.tag-sm { padding: 2px 8px; font-size: 0.7rem; }
.tag-accent { background: rgba(var(--accent-rgb),0.15); color: var(--accent); }
.tag-assets { background: rgba(var(--accent-rgb),0.16); color: var(--accent); border: 1px solid rgba(var(--accent-rgb),0.24); }

/* === FILTERS BAR === */
.filters-bar {
    display: flex; flex-wrap: wrap; gap: 15px; align-items: center;
    padding: 15px 20px; margin-bottom: 30px;
}
.filter-search { flex: 1; min-width: 200px; }
.filter-categories { display: flex; flex-wrap: wrap; gap: 8px; }

.tools-search-panel {
    position: sticky;
    top: calc(var(--nav-height) + 10px);
    z-index: 32;
    align-items: stretch;
    border-color: rgba(var(--primary-rgb),0.28);
}
.tool-search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: min(100%, 320px);
}
.tool-search-box .form-control {
    height: 52px;
    padding-left: 46px;
    padding-right: 42px;
    border-color: rgba(var(--primary-rgb),0.3);
    background: rgba(0,0,0,0.22);
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.tool-search-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.16), var(--glow-primary);
    background: rgba(0,0,0,0.36);
}
.tool-search-icon {
    position: absolute;
    left: 15px;
    z-index: 2;
    color: var(--primary);
    font-size: 1rem;
    pointer-events: none;
}
.tool-search-clear {
    position: absolute;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    font-size: 1.05rem;
    line-height: 1;
}
.tool-search-clear:hover {
    color: #000;
    background: var(--primary);
}
.tool-search-status {
    min-width: 138px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 13px;
    border-radius: var(--radius-sm);
    background: rgba(var(--primary-rgb),0.08);
    border: 1px solid rgba(var(--primary-rgb),0.2);
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.2;
}
.tool-search-status strong {
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1;
}
.tools-search-panel.is-searching {
    border-color: rgba(var(--primary-rgb),0.54);
    box-shadow: var(--glow-primary), var(--glass-shadow);
}
.tools-grid.has-live-search .tool-card {
    transition: opacity var(--transition), transform var(--transition), border-color var(--transition);
}
.tool-card.search-match {
    border-color: rgba(var(--primary-rgb),0.46);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb),0.18), var(--glass-shadow);
}
.tool-card-title mark {
    padding: 0 3px;
    border-radius: 4px;
    color: #000;
    background: var(--primary);
}
.tool-live-empty {
    margin-top: -10px;
    padding: 34px 20px;
}

/* === FORMS === */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; margin-bottom: 6px; font-size: 0.85rem;
    font-weight: 600; color: var(--text-secondary);
}
.form-control {
    width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-family: var(--font-primary);
    font-size: 0.95rem; outline: none; transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.1), var(--glow-primary);
    background: rgba(255,255,255,0.05);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* === BENEFITS === */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.benefit-item { display: flex; gap: 20px; padding: 24px; align-items: flex-start; }
.benefit-icon { font-size: 2rem; flex-shrink: 0; width: 50px; text-align: center; }
.benefit-text h4 { margin-bottom: 6px; font-size: 1rem; }
.benefit-text p { color: var(--text-secondary); font-size: 0.9rem; }

/* === CONTENT LAYOUT (Sidebar) === */
.content-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.content-main { min-width: 0; }
.content-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget { padding: 20px; }
.sidebar-widget h4 { margin-bottom: 15px; font-size: 1rem; color: var(--primary); }
.widget-list { list-style: none; }
.widget-list li { padding: 8px 0; border-bottom: 1px solid var(--glass-border); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a { color: var(--text-secondary); font-size: 0.9rem; }
.widget-list a:hover { color: var(--primary); }
.widget-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* === NOVEDADES TIMELINE === */
.novedades-timeline { display: flex; flex-direction: column; gap: 20px; }
.novedad-item { padding: 24px; }
.novedad-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 15px; }
.novedad-date-badge {
    flex-shrink: 0; text-align: center; padding: 10px 15px;
    background: rgba(var(--primary-rgb),0.1); border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--primary-rgb),0.2);
}
.date-day { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.date-month { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.novedad-title { font-size: 1.15rem; margin-bottom: 8px; }
.novedad-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.novedad-body { color: var(--text-secondary); line-height: 1.7; font-size: 0.95rem; }
.novedad-media { margin-top: 15px; border-radius: var(--radius-md); overflow: hidden; }
.novedad-img { width: 100%; border-radius: var(--radius-md); }
.novedad-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }

/* === DOWNLOADS === */
.downloads-grid { grid-template-columns: repeat(2, 1fr); }
.download-card { display: flex; gap: 20px; padding: 20px; align-items: center; }
.download-icon {
    flex-shrink: 0; width: 70px; height: 70px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(var(--primary-rgb),0.08); border-radius: var(--radius-md);
    position: relative;
}
.file-type-icon { font-size: 2rem; }
.file-ext-badge {
    position: absolute; bottom: -4px; right: -4px;
    padding: 2px 6px; border-radius: 4px; font-size: 0.6rem; font-weight: 700;
    background: var(--primary); color: #000;
}
.download-info { flex: 1; min-width: 0; }
.download-title { font-size: 1rem; margin-bottom: 5px; font-family: var(--font-primary); font-weight: 600; }
.download-desc { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 8px; line-height: 1.4; }
.download-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.meta-item { font-size: 0.75rem; color: var(--text-muted); }
.download-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* Dynamic resources */
.resources-hero .section-badge,
.resource-detail-header .section-badge { margin-bottom: 12px; }
.resources-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(150px, 210px)) auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin-bottom: 28px;
}
.resource-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.resource-hero-stats span {
    padding: 9px 13px;
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(0,212,255,0.16);
    color: var(--text-secondary);
    font-weight: 700;
}
.resource-hero-stats strong { color: var(--primary); }
.resource-search-box { position: relative; }
.resource-search-box span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    z-index: 1;
}
.resource-search-box .form-control { padding-left: 42px; }
.resource-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 16px;
}
.resource-section-heading h2 {
    margin: 6px 0 0;
    font-size: 1.45rem;
    color: var(--text-primary);
}
.resource-order-note {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: right;
}
.resource-trending-panel {
    padding: 18px;
    margin-bottom: 28px;
}
.resource-trending-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.resource-trend-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 96px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0,212,255,0.16);
    background: linear-gradient(135deg, rgba(0,212,255,0.07), rgba(123,47,247,0.06));
    color: var(--text-primary);
}
.resource-trend-card:hover {
    border-color: rgba(0,212,255,0.45);
    transform: translateY(-1px);
}
.resource-trend-media {
    width: 84px;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.22);
}
.resource-trend-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.resource-trend-placeholder {
    color: var(--primary);
    font-size: 1.6rem;
}
.resource-trend-body {
    min-width: 0;
    display: grid;
    gap: 6px;
}
.resource-trend-body strong {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
}
.resource-trend-body small {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resource-list-heading { margin-top: 4px; }
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.resource-card {
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.resource-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(123,47,247,0.12));
}
.resource-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 220ms ease;
}
.resource-card:hover .resource-media img { transform: scale(1.035); }
.resource-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: var(--primary);
}
.resource-video-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.62);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}
.resource-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.resource-detail-meta span {
    padding: 8px 11px;
    border-radius: 8px;
    border: 1px solid rgba(0,212,255,0.18);
    background: rgba(0,212,255,0.08);
    color: var(--text-primary);
    font-weight: 800;
    font-size: 0.85rem;
}
.resource-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.resource-card-head,
.resource-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.resource-body h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.25;
}
.resource-body h2 a { color: var(--text-primary); }
.resource-body p {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.92rem;
}
.resource-subtitle { color: var(--primary) !important; font-weight: 700; }
.resource-card-foot { margin-top: auto; color: var(--text-muted); font-size: 0.85rem; }
.resource-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}
.resource-detail-main { display: grid; gap: 22px; }
.resource-detail-media {
    padding: 0;
    overflow: hidden;
    background: #020611;
}
.resource-detail-media img,
.resource-detail-media video,
.resource-detail-media iframe {
    width: 100%;
    min-height: 360px;
    max-height: 620px;
    object-fit: contain;
    display: block;
    border: 0;
    background: #020611;
}
.resource-content,
.download-sites,
.payment-panel,
.resource-gallery-strip,
.resource-side-card { padding: 22px; }
.resource-content h2,
.resource-side-card h3 { color: var(--primary); margin-bottom: 12px; }
.resource-summary {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 14px;
}
.resource-prose {
    color: var(--text-secondary);
    line-height: 1.75;
}
.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.resource-gallery-strip h2 {
    color: var(--primary);
    margin-bottom: 14px;
}
.resource-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.resource-gallery-grid a {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
}
.resource-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.payment-method-card {
    min-height: 92px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(0,212,255,0.18);
    background: rgba(255,255,255,0.045);
    color: var(--text-primary);
    display: grid;
    gap: 8px;
}
.payment-method-card strong { color: var(--primary); }
.payment-method-card small { color: var(--text-secondary); line-height: 1.45; }
.payment-method-card code {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 8px;
    color: #dff8ff;
}
.download-sites-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.download-site-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 12px;
    align-items: center;
    min-height: 78px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,212,255,0.18);
    background: rgba(255,255,255,0.045);
    color: var(--text-primary);
}
.download-site-card:hover {
    border-color: rgba(0,212,255,0.55);
    transform: translateY(-1px);
}
.download-site-logo {
    grid-row: 1 / 3;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(0,212,255,0.12);
    color: var(--primary);
    font-size: 1.3rem;
}
.download-site-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.download-site-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.download-site-card small {
    color: var(--text-secondary);
    line-height: 1.35;
}
.resource-detail-sidebar {
    display: grid;
    gap: 16px;
    position: sticky;
    top: calc(var(--nav-height) + 18px);
}
html[data-page="recursos"] .ad-slot-header_bottom,
html[data-page="recurso-detail"] .ad-slot-header_bottom,
html[data-page="recursos"] .ad-slot-resources_top,
html[data-page="recursos"] .ad-slot-in_content_1,
html[data-page="recurso-detail"] .ad-slot-resource_detail_top,
html[data-page="recurso-detail"] .ad-slot-in_content_1 {
    display: none !important;
}

/* === GALLERY === */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.gallery-item { padding: 0; overflow: hidden; cursor: pointer; }
.gallery-img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.gallery-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.5); display: flex;
    align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-zoom-icon { font-size: 2rem; color: #fff; }
.gallery-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 3rem; background: rgba(var(--primary-rgb),0.05);
}
.gallery-caption { padding: 15px; }
.gallery-caption h4 { font-size: 0.95rem; font-family: var(--font-primary); margin-bottom: 5px; }

/* Gallery Modal */
.gallery-modal, .pdf-preview-modal {
    display: none; position: fixed; inset: 0; z-index: var(--z-modal);
    align-items: center; justify-content: center; padding: 20px;
}
.gallery-modal-overlay, .pdf-preview-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
}
.gallery-modal-content, .pdf-preview-content {
    position: relative; z-index: 1; max-width: 900px; width: 100%;
    max-height: 90vh; overflow-y: auto; padding: 0;
}
.gallery-modal-close {
    position: absolute; top: 15px; right: 15px; z-index: 2;
    width: 36px; height: 36px; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
}
.gallery-modal-img { max-height: 60vh; overflow: hidden; }
.gallery-modal-img img { width: 100%; height: 100%; object-fit: contain; }
.gallery-modal-info { padding: 20px; }
.gallery-modal-info h3 { margin-bottom: 10px; }
.gallery-modal-info p { color: var(--text-secondary); margin-bottom: 15px; }
.gallery-modal-specs {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}
.gallery-spec-group {
    border: 1px solid rgba(0, 212, 255, 0.16);
    border-radius: 8px;
    padding: 12px;
    background: rgba(0, 14, 28, 0.42);
}
.gallery-spec-group h4 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.82rem;
    text-transform: uppercase;
}
.gallery-spec-group ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
}
.gallery-spec-group code {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    color: #dff8ff;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: 6px;
    padding: 4px 6px;
}
.gallery-modal-links { display: flex; flex-wrap: wrap; gap: 8px; }

.pdf-preview-content { max-width: 1000px; padding: 20px; }
.pdf-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.pdf-preview-header h3 { font-size: 1.1rem; }

/* === CONTACT === */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-card { padding: 24px; }
.contact-card h3 { margin-bottom: 12px; color: var(--primary); }
.contact-card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 12px; }

.social-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 15px; }
.social-card {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    text-decoration: none; color: var(--text-primary);
}
.social-card:hover { transform: translateY(-3px); color: var(--text-primary); }
.social-icon { font-size: 1.3rem; }
.social-name { font-size: 0.85rem; font-weight: 600; }
.social-whatsapp:hover { border-color: #25d366; box-shadow: 0 0 15px rgba(37,211,102,0.3); }
.social-telegram:hover { border-color: #0088cc; box-shadow: 0 0 15px rgba(0,136,204,0.3); }
.social-facebook:hover { border-color: #1877f2; box-shadow: 0 0 15px rgba(24,119,242,0.3); }
.social-youtube:hover { border-color: #ff0000; box-shadow: 0 0 15px rgba(255,0,0,0.3); }
.social-tiktok:hover { border-color: #ff0050; box-shadow: 0 0 15px rgba(255,0,80,0.3); }
.social-instagram:hover { border-color: #e4405f; box-shadow: 0 0 15px rgba(228,64,95,0.3); }

.contact-form-card { padding: 30px; }
.contact-form-card h3 { margin-bottom: 20px; color: var(--primary); }

/* === MANUALS === */
.manuals-grid { grid-template-columns: repeat(3, 1fr); }
.manual-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.manual-cover { aspect-ratio: 3/4; max-height: 220px; overflow: hidden; background: rgba(var(--secondary-rgb),0.08); }
.manual-cover img { width: 100%; height: 100%; object-fit: cover; }
.manual-cover-placeholder {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    font-size: 3rem; color: var(--text-muted);
}
.cover-text { font-size: 0.9rem; font-weight: 700; }
.manual-info { padding: 15px; flex: 1; }
.manual-title { font-size: 1rem; margin: 8px 0; font-family: var(--font-primary); font-weight: 600; }
.manual-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.4; }
.manual-actions { display: flex; gap: 8px; padding: 15px; border-top: 1px solid var(--glass-border); }

/* === NEWS FEED === */
.news-feed { display: flex; flex-direction: column; gap: 24px; }
.news-article { padding: 24px; }
.news-article-header { margin-bottom: 15px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.news-date { color: var(--text-muted); font-size: 0.8rem; }
.news-category { font-size: 0.7rem; }
.news-title { font-size: 1.2rem; font-family: var(--font-primary); font-weight: 700; }
.news-title a { color: var(--text-primary); }
.news-title a:hover { color: var(--primary); }
.news-article-img { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 15px; max-height: 300px; }
.news-article-img img { width: 100%; height: 100%; object-fit: cover; }
.news-article-body { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; margin-bottom: 15px; }
.news-article-video { margin-bottom: 15px; }
.news-video { width: 100%; border-radius: var(--radius-md); }
.news-article-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.news-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.news-attachments { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--glass-border); }
.attachments-label { font-size: 0.85rem; color: var(--text-muted); }

/* Featured News */
.featured-news { padding: 0; overflow: hidden; position: relative; }
.featured-badge {
    position: absolute; top: 15px; left: 15px; z-index: 1;
    padding: 6px 16px; border-radius: 50px;
    background: rgba(var(--accent-rgb),0.9); color: #000;
    font-size: 0.8rem; font-weight: 700;
}
.featured-content { display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
.featured-img { overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-text { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.featured-text .news-date { display: block; margin-bottom: 10px; color: var(--text-muted); font-size: 0.8rem; }
.featured-text h2 { font-size: 1.5rem; margin-bottom: 12px; }
.featured-text p { color: var(--text-secondary); margin-bottom: 20px; font-size: 0.95rem; }

/* === TOOL DETAIL === */
.tool-detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; }
.tool-detail-main { display: flex; flex-direction: column; gap: 24px; }
.tool-detail-hero { display: flex; gap: 24px; padding: 30px; align-items: center; }
.tool-detail-icon { flex-shrink: 0; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.tool-detail-icon img { max-width: 100%; max-height: 100%; }
.tool-icon-large { font-size: 4rem; }
.tool-detail-info h2 { margin-bottom: 10px; }
.tool-short-desc { color: var(--text-secondary); font-size: 1.05rem; }
.tool-detail-description { padding: 24px; }
.tool-detail-description h3 { margin-bottom: 15px; color: var(--primary); }
.tool-long-desc { color: var(--text-secondary); line-height: 1.8; font-size: 0.95rem; }
.tool-spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tool-spec-card { padding: 24px; }
.tool-spec-card h3 { margin-bottom: 15px; color: var(--primary); }
.detail-list { margin: 0; padding-left: 20px; color: var(--text-secondary); line-height: 1.8; }
.detail-list li { margin-bottom: 6px; }
.detail-list-numbered { padding-left: 22px; }
.formula-list { display: grid; gap: 10px; }
.formula-list code {
    display: block; padding: 12px 14px; border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.28); border: 1px solid var(--glass-border);
    color: var(--accent); white-space: normal; line-height: 1.6;
}
.asset-source-title {
    margin-bottom: 14px; color: var(--text-secondary); padding: 10px 12px;
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.2);
}
.asset-content-list { display: grid; gap: 10px; }
.asset-content-list p {
    margin: 0; color: var(--text-secondary); line-height: 1.75;
    padding-bottom: 10px; border-bottom: 1px solid var(--glass-border);
}
.asset-content-list p:last-child { border-bottom: none; padding-bottom: 0; }
.source-file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.source-file-list code {
    font-size: 0.75rem; padding: 4px 7px; border-radius: 6px;
    background: rgba(0,0,0,0.25); color: var(--accent);
}
.creator-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.creator-profile img {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--primary); box-shadow: var(--glow-primary);
}
.creator-profile h4 { margin-bottom: 4px; color: var(--text-primary); }
.creator-profile p { margin: 0; color: var(--text-muted); }
.legal-document h2, .legal-document h3, .legal-document h4 { color: var(--primary); margin: 18px 0 10px; }
.legal-document p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 10px; }
.assets-catalog-list { display: grid; gap: 18px; margin-top: 26px; }
.asset-folder-card { padding: 22px; }
.asset-folder-head {
    display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
    border-bottom: 1px solid var(--glass-border); padding-bottom: 14px; margin-bottom: 14px;
}
.asset-folder-head h3 { margin-bottom: 5px; color: var(--text-primary); }
.asset-folder-head p { margin: 0; color: var(--text-muted); font-size: 0.78rem; overflow-wrap: anywhere; }
.asset-folder-metrics, .asset-linked-tools {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.asset-folder-metrics span {
    padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,0.06);
    color: var(--text-secondary); font-size: 0.78rem;
}
.asset-linked-tools strong { color: var(--primary); margin-right: 4px; }
.asset-linked-tools a { text-decoration: none; }
.asset-summary p { margin: 8px 0 0; color: var(--text-secondary); line-height: 1.65; }
.product-info-card { padding: 30px; }
.product-info-header { text-align: center; max-width: 900px; margin: 0 auto 26px; }
.product-info-desc { color: var(--text-secondary); line-height: 1.8; margin-top: 12px; }
.product-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.product-info-block {
    padding: 20px; border: 1px solid var(--glass-border); border-radius: var(--radius-md);
    background: rgba(255,255,255,0.04);
}
.product-info-block h3 { color: var(--primary); margin-bottom: 12px; font-size: 1rem; }
.product-info-meta {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
    margin: 24px 0 16px;
}
.product-info-meta span {
    padding: 8px 12px; border-radius: 999px; background: rgba(0,0,0,0.22);
    color: var(--text-secondary); border: 1px solid var(--glass-border);
}
.product-warning {
    padding: 14px 16px; border-radius: var(--radius-md); color: var(--text-secondary);
    border: 1px solid rgba(255,214,107,0.35); background: rgba(255,214,107,0.08);
    line-height: 1.7;
}
.product-info-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.tool-screenshots { padding: 24px; }
.tool-screenshots h3 { margin-bottom: 15px; color: var(--primary); }
.screenshot-item { border-radius: var(--radius-md); overflow: hidden; cursor: pointer; }
.screenshot-item img { width: 100%; transition: var(--transition); }
.screenshot-item:hover img { transform: scale(1.05); }

.tool-detail-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { padding: 20px; }
.sidebar-card h4 { margin-bottom: 15px; color: var(--primary); font-size: 1rem; }
.info-list { list-style: none; }
.info-list li { padding: 10px 0; border-bottom: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 5px; }
.info-list li:last-child { border-bottom: none; }
.info-list li > span { font-size: 0.8rem; color: var(--text-muted); }
.sidebar-actions { display: flex; flex-direction: column; gap: 8px; }

/* === UPDATES TIMELINE === */
.updates-timeline { display: flex; flex-direction: column; gap: 16px; }
.update-item { display: flex; gap: 20px; padding: 20px; align-items: flex-start; }
.update-date { flex-shrink: 0; text-align: center; }
.update-day { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.update-month { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.update-content h4 { margin-bottom: 5px; font-size: 1rem; font-family: var(--font-primary); }
.update-content p { color: var(--text-secondary); font-size: 0.9rem; }
.update-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* === CTA SECTION === */
.cta-section { padding-bottom: 100px; }
.cta-box {
    padding: 60px 40px; text-align: center;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.08), rgba(var(--secondary-rgb),0.08));
    border: 1px solid rgba(var(--primary-rgb),0.15);
}
.cta-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 15px; }
.cta-desc { color: var(--text-secondary); max-width: 500px; margin: 0 auto 25px; font-size: 1.05rem; }
.cta-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* === FOOTER === */
.main-footer {
    border-radius: 0; border-bottom: none; border-left: none; border-right: none;
    border-top: 1px solid var(--glass-border);
    padding: 50px 0 30px;
    margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-title { font-size: 1.3rem; margin-bottom: 12px; }
.footer-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 12px; color: var(--primary); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--glass-bg); border: 1px solid var(--glass-border);
    font-size: 1.1rem; text-decoration: none; transition: var(--transition);
}
.social-btn:hover { border-color: var(--primary); background: rgba(var(--primary-rgb),0.1); transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }
.footer-credits { margin-top: 4px; }

/* === ALERTS === */
.alert {
    padding: 14px 20px; border-radius: var(--radius-md); margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px; font-size: 0.9rem;
}
.alert-success { background: rgba(var(--accent-rgb),0.1); border: 1px solid rgba(var(--accent-rgb),0.3); color: var(--accent); }
.alert-error { background: rgba(255,71,87,0.1); border: 1px solid rgba(255,71,87,0.3); color: var(--danger); }

/* === EMPTY STATE === */
.empty-state { padding: 60px 20px; }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 15px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); }

/* === MODAL OVERLAY === */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: var(--z-modal);
    background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-content { max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 30px; }

/* === AD SLOTS === */
.ad-slot { margin: 15px 0; text-align: center; min-height: 20px; }
.ad-slot:empty { display: none; }
.custom-ad { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); overflow: hidden; background: rgba(255,255,255,0.04); }
.custom-ad-image img { max-width: 100%; height: auto; display: block; }
.custom-ad-text { padding: 12px 18px; color: var(--primary); font-weight: 700; }
.ad-rail {
    position: fixed; top: calc(var(--nav-height) + 25px); width: 150px; z-index: 5;
    display: flex; flex-direction: column; gap: 12px; pointer-events: none;
}
.ad-rail .ad-slot { pointer-events: auto; margin: 0; }
.ad-rail-left { left: 12px; }
.ad-rail-right { right: 12px; }

.mobile-bottom-nav,
.mobile-scroll-top {
    display: none;
}

/* === AUTH, PROFILE AND VIDEO FEED === */
.auth-shell { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 460px; padding: 30px; }
.auth-link { margin-top: 18px; color: var(--text-secondary); text-align: center; }
.video-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.video-feed { display: grid; gap: 24px; }
.video-card { overflow: hidden; padding: 0; }
.video-frame { aspect-ratio: 16 / 9; background: rgba(0,0,0,0.38); display: flex; align-items: center; justify-content: center; }
.video-frame video, .video-frame iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-body { padding: 22px; }
.video-body h2 { margin: 10px 0; font-size: 1.25rem; }
.video-body p { color: var(--text-secondary); line-height: 1.7; }
.video-meta { margin-top: 14px; color: var(--text-muted); font-size: 0.84rem; }
.video-submit { padding: 24px; position: sticky; top: calc(var(--nav-height) + 20px); }
.video-submit h3 { color: var(--primary); margin-bottom: 16px; }
.video-feed-shell {
    --video-feed-bottom-space: 104px;
    --video-feed-header-space: 86px;
    --video-reel-height: calc(100svh - var(--nav-height) - var(--video-feed-header-space) - var(--video-feed-bottom-space));
    min-height: 100svh;
    height: 100svh;
    overflow: hidden;
    margin: calc(var(--nav-height) * -1) -20px 0;
    padding: calc(var(--nav-height) + 18px) 16px 118px;
    background:
        linear-gradient(135deg, rgba(0,229,255,0.1), transparent 28%),
        linear-gradient(180deg, #050718 0%, #08091d 50%, #020617 100%);
}
html[data-page="videos"],
html[data-page="videos"] body {
    min-height: 100svh;
    overflow: hidden;
}
html[data-page="videos"] .main-content {
    min-height: 100svh;
    overflow: hidden;
}
.video-feed-header {
    position: sticky;
    top: var(--nav-height);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(1180px, 100%);
    margin: 0 auto 14px;
    padding: 12px 14px;
    border: 1px solid rgba(var(--primary-rgb),0.16);
    border-radius: 24px;
    background: rgba(8,10,30,0.62);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    box-shadow: 0 18px 45px rgba(0,0,0,0.28);
}
.video-feed-header h1 { margin: 0; color: var(--primary); font-size: clamp(1.25rem, 2.5vw, 2rem); }
.video-feed-header p { margin: 3px 0 0; color: var(--text-secondary); max-width: 640px; }
.video-back,
.feed-sound-toggle,
.feed-refresh {
    min-width: 48px;
    min-height: 48px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.055);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}
.feed-sound-toggle { min-width: 92px; padding: 0 14px; color: var(--primary); }
.video-feed-controls { display: flex; align-items: center; gap: 10px; }
.vertical-video-feed {
    width: min(520px, 100%);
    height: max(560px, var(--video-reel-height));
    max-height: max(560px, var(--video-reel-height));
    margin: 0 auto;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;
    scrollbar-width: none;
    border-radius: 28px;
}
.vertical-video-feed::-webkit-scrollbar { display: none; }
.video-reel-card {
    height: max(560px, var(--video-reel-height));
    min-height: max(560px, var(--video-reel-height));
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 8px 0;
}
.reel-player {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(var(--primary-rgb),0.2);
    box-shadow: 0 22px 60px rgba(0,0,0,0.44), 0 0 28px rgba(var(--primary-rgb),0.13);
    display: grid;
    place-items: center;
}
.reel-player video,
.reel-player iframe {
    width: 100%;
    height: 100%;
    min-height: inherit;
    border: 0;
    display: block;
    object-fit: cover;
    background: #000;
}
.reel-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.05) 42%, rgba(2,6,23,0.88) 100%);
}
.reel-info {
    position: absolute;
    left: 22px;
    right: 88px;
    bottom: 28px;
    z-index: 4;
    display: grid;
    gap: 8px;
}
.reel-author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.reel-author span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #00131a;
    font-weight: 900;
}
.reel-author strong,
.reel-author small {
    display: block;
}
.reel-author small {
    color: rgba(255,255,255,0.68);
    font-size: 0.78rem;
}
.reel-center-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.88);
    color: #06111a;
    font-size: 1.8rem;
    z-index: 6;
    display: grid;
    place-items: center;
    box-shadow: 0 18px 45px rgba(0,0,0,0.32);
}
.video-codec-warning {
    position: absolute;
    left: 18px;
    right: 78px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 193, 7, 0.28);
    background: rgba(8, 10, 18, 0.86);
    color: #fff;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 16px 42px rgba(0,0,0,0.42);
}
.video-codec-warning[hidden] { display: none; }
.video-codec-warning strong {
    color: #ffd166;
    font-size: 1rem;
}
.video-codec-warning span {
    color: rgba(255,255,255,0.82);
    line-height: 1.45;
    font-size: 0.86rem;
}
.video-codec-problem .reel-center-play {
    opacity: 0.35;
}
.reel-info h2 { margin: 0; font-size: 1.18rem; line-height: 1.2; color: #fff; }
.reel-info p { margin: 0; color: rgba(245,250,255,0.86); line-height: 1.55; max-height: 5rem; overflow: hidden; }
.reel-info .tag {
    width: max-content;
    max-width: 100%;
    background: rgba(var(--primary-rgb),0.18);
    border: 1px solid rgba(var(--primary-rgb),0.28);
    color: var(--primary);
}
.reel-actions {
    position: absolute;
    right: 18px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 5;
    display: grid;
    gap: 10px;
}
.reel-actions button,
.reel-actions a {
    width: 62px;
    min-height: 58px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(8,10,30,0.58);
    color: #fff;
    backdrop-filter: blur(14px);
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 1.08rem;
    text-align: center;
    text-decoration: none;
}
.reel-actions small {
    display: block;
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.58rem;
    line-height: 1;
}
.external-video-link { height: 100%; min-height: 560px; display: grid; place-items: center; gap: 16px; align-content: center; }
.external-video-link span { color: var(--primary); font-size: 4rem; }
.feed-tabbar {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 80;
    width: min(560px, calc(100% - 24px));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 24px;
    border: 1px solid rgba(var(--primary-rgb),0.18);
    background: rgba(5,7,24,0.94);
    backdrop-filter: blur(20px);
    box-shadow: 0 -14px 38px rgba(0,0,0,0.36);
}
html[data-page="videos"] .mobile-bottom-nav {
    display: none !important;
}
html[data-page="videos"] .ad-slot-header_bottom,
html[data-page="videos"] .ad-slot-video_feed_top {
    display: none !important;
}
.video-share-sheet {
    position: fixed;
    inset: 0;
    z-index: 2147483200;
    display: grid;
    align-items: end;
    padding: 16px;
}
.video-share-sheet[hidden] { display: none; }
.video-share-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.58);
    backdrop-filter: blur(8px);
}
.video-share-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    margin: 0 auto;
    padding: 18px;
    border-radius: 18px;
}
.video-share-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.video-share-head h2 {
    color: var(--primary);
    margin: 0 0 4px;
    font-size: 1.1rem;
}
.video-share-head p {
    margin: 0;
    color: var(--text-secondary);
}
.video-share-head button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
.video-share-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.video-share-grid a,
.video-share-grid button {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb),0.18);
    background: rgba(0,212,255,0.08);
    color: var(--primary);
    font-weight: 800;
    display: grid;
    place-items: center;
    text-align: center;
}
.feed-tabbar a {
    min-width: 0;
    min-height: 52px;
    border-radius: 16px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 800;
}
.feed-tabbar button {
    border: 0;
    font-family: inherit;
}
.feed-plus-action {
    min-width: 0;
    min-height: 58px;
    margin-top: -18px;
    border-radius: 20px;
    color: #06111a;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 0.72rem;
    font-weight: 900;
    box-shadow: 0 12px 34px rgba(0,212,255,0.34);
}
.feed-plus-action span {
    width: 34px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    line-height: 1;
}
.feed-plus-action small { font-size: 0.66rem; }
.feed-tabbar span { font-size: 1.12rem; line-height: 1; }
.feed-tabbar a.active,
.feed-tabbar a:hover { color: #06111a; background: var(--primary); }
.feed-loading { min-height: 520px; display: grid; place-items: center; align-content: center; text-align: center; }
.video-watch-shell {
    width: min(1120px, 100%);
    margin: 0 auto 22px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 20px;
    align-items: stretch;
}
.video-watch-player {
    min-height: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(var(--primary-rgb),0.2);
}
.video-watch-player video,
.video-watch-player iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    display: block;
    object-fit: contain;
    background: #000;
}
.video-watch-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px;
}
.video-watch-info h2 { color: var(--primary); margin: 0; font-size: clamp(1.45rem, 3vw, 2.35rem); }
.video-watch-info p { color: var(--text-secondary); line-height: 1.7; }
.video-watch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.video-expanded-view {
    position: fixed;
    inset: 0;
    z-index: 2147483100;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #02040b;
    color: #fff;
    padding: env(safe-area-inset-top) 10px env(safe-area-inset-bottom);
}
.video-expanded-view[hidden] { display: none; }
.video-expanded-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}
.video-expanded-back {
    min-width: 58px;
    min-height: 38px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 800;
}
.video-expanded-top h2 {
    margin: 0;
    font-size: 0.95rem;
}
.video-expanded-top p {
    margin: 2px 0 0;
    color: rgba(255,255,255,0.68);
    font-size: 0.74rem;
}
.video-expanded-player {
    min-height: 0;
    display: grid;
    place-items: center;
    background: #000;
}
.video-expanded-player video,
.video-expanded-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #000;
}
.video-expanded-controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0 10px;
    color: #fff;
    font-size: 0.76rem;
}
.video-expanded-controls input { width: 100%; }
.video-expanded-controls button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.video-participation {
    position: fixed;
    inset: 0;
    z-index: 2147483190;
    display: none;
    align-items: center;
    justify-content: center;
    padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    scroll-margin-top: 0;
}
.video-participation.active { display: flex; }
.video-upload-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.68);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.participation-card {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(92svh, 880px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.46);
}
.video-upload-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.video-upload-head h2 {
    color: var(--primary);
    margin: 8px 0 6px;
    font-size: clamp(1.35rem, 3vw, 2rem);
}
.video-upload-head p {
    color: var(--text-secondary);
    margin: 0;
}
.video-upload-head button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    font-weight: 900;
}
.participation-card h2 { color: var(--primary); margin-bottom: 14px; }
.participation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.participation-grid > div,
.login-callout {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
    padding: 16px;
}
.upload-preview {
    margin: 8px 0 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    background: rgba(0,0,0,0.18);
}
.upload-preview video { width: 100%; max-height: 360px; border-radius: var(--radius-sm); background: #000; }
.upload-progress-wrap { margin: 10px 0 16px; }
.upload-progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--text-secondary); font-size: 0.86rem; }
.upload-progress-track { height: 13px; border-radius: 999px; overflow: hidden; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.08); }
.upload-bar { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .2s ease; }
.upload-result-message {
    margin: 8px 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb),0.18);
    background: rgba(0,212,255,0.08);
    color: var(--text-primary);
    font-weight: 800;
}
.upload-result-message.success {
    border-color: rgba(0,255,136,0.28);
    background: rgba(0,255,136,0.1);
    color: #caffdf;
}
.upload-result-message.error {
    border-color: rgba(255,75,95,0.32);
    background: rgba(255,75,95,0.12);
    color: #ffd5dc;
}
.video-gallery-section {
    width: min(1180px, 100%);
    margin: 34px auto 0;
    scroll-margin-top: calc(var(--nav-height) + 90px);
}
html[data-page="videos"] .video-gallery-section {
    display: none !important;
}
.video-gallery-panel { padding: 24px; }
.video-gallery-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.video-gallery-head h2 { color: var(--primary); margin: 0 0 6px; }
.video-gallery-head p { color: var(--text-secondary); margin: 0; line-height: 1.55; }
.video-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}
.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.video-gallery-card {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
}
.video-gallery-thumb {
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    background: #000;
    color: var(--primary);
    font-size: 2.6rem;
    overflow: hidden;
}
.video-gallery-thumb video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.video-gallery-body { padding: 16px; }
.video-gallery-body h3 { margin: 10px 0 8px; font-size: 1.05rem; line-height: 1.25; }
.video-gallery-body h3 a { color: var(--text-primary); }
.video-gallery-body p {
    min-height: 3.2rem;
    max-height: 4.8rem;
    overflow: hidden;
    color: var(--text-secondary);
    line-height: 1.55;
}
.profile-grid, .profile-dashboard { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.profile-main { display: grid; gap: 24px; }
.profile-card, .profile-card-wide { padding: 26px; }
.profile-avatar { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #000; font-size: 2rem; font-weight: 900; margin-bottom: 16px; }
.profile-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); box-shadow: var(--glow-primary); margin-bottom: 16px; }
.profile-form { margin-top: 16px; }
.table-like { display: grid; gap: 10px; margin-top: 15px; }
.table-like div { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); }
.table-like span { color: var(--primary); font-weight: 700; }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.community-card { overflow: hidden; padding: 0; }
.community-media { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.32); color: var(--primary); font-size: 3rem; }
.community-media img, .community-media video { width: 100%; height: 100%; object-fit: cover; }
.community-body { padding: 20px; }
.community-body h3 { margin: 10px 0; font-size: 1.05rem; }
.community-body p { color: var(--text-secondary); line-height: 1.65; }
.profile-chat-check {
    align-self: end;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
}
.chat-shell {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    min-height: 680px;
}
.chat-sidebar,
.chat-panel {
    padding: 22px;
    min-height: 680px;
}
.chat-sidebar-head,
.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}
.chat-sidebar-head h2,
.chat-head h2 { margin: 0; color: var(--primary); font-size: 1.25rem; }
.chat-head { justify-content: flex-start; }
.chat-head p { margin: 3px 0 0; color: var(--text-secondary); }
.chat-start-form { margin: 18px 0; }
.chat-conversation-list {
    display: grid;
    gap: 10px;
    max-height: 470px;
    overflow-y: auto;
    padding-right: 4px;
}
.chat-thread {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    background: rgba(255,255,255,0.035);
}
.chat-thread.active,
.chat-thread:hover {
    border-color: rgba(var(--primary-rgb),0.42);
    background: rgba(var(--primary-rgb),0.11);
}
.chat-thread strong,
.chat-thread small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-thread small { color: var(--text-secondary); margin-top: 3px; }
.chat-thread b {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #06111a;
    font-size: 0.75rem;
}
.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    object-fit: cover;
    background: var(--primary);
    color: #06111a;
    font-weight: 900;
    flex: 0 0 auto;
}
.chat-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 16px;
}
.chat-empty {
    min-height: 480px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    color: var(--text-secondary);
}
.chat-empty span { color: var(--primary); font-size: 3rem; }
.chat-messages {
    min-height: 420px;
    max-height: 520px;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.16);
}
.chat-message { display: flex; justify-content: flex-start; }
.chat-message.mine { justify-content: flex-end; }
.chat-bubble {
    width: min(74%, 620px);
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.055);
    color: var(--text-primary);
}
.chat-message.mine .chat-bubble {
    background: rgba(var(--primary-rgb),0.16);
    border-color: rgba(var(--primary-rgb),0.32);
}
.chat-bubble p { margin: 0 0 8px; line-height: 1.55; }
.chat-bubble small { color: var(--text-muted); display: block; margin-top: 7px; }
.chat-media-image,
.chat-media-video {
    display: block;
    width: 100%;
    max-height: 320px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: #000;
    margin-top: 8px;
}
.chat-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
    color: var(--primary);
}
.chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 240px) auto;
    gap: 10px;
    align-items: end;
}

/* === SMART DESKTOP MODE === */
@media (min-width: 1025px) {
    .device-desktop .nav-container { max-width: none; }
    .device-desktop .nav-menu { flex: 1 1 auto; justify-content: flex-start; }
    .device-desktop .nav-menu a { padding: 8px 11px; font-size: 0.82rem; }
    .device-desktop .nav-actions { flex-shrink: 0; }
    .device-desktop .nav-logo { font-size: 1.22rem; }
    .device-desktop .logo-icon { font-size: 1.55rem; }
    .device-desktop .main-content { position: relative; z-index: 1; }
    .device-desktop .page-header .container,
    .device-desktop .section .container { max-width: 1280px; }
    .device-desktop .filters-bar { position: sticky; top: calc(var(--nav-height) + 12px); z-index: 30; }
}

/* === MAINTENANCE === */
.maintenance-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 40px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(var(--primary-rgb),0.2); }
    50% { box-shadow: 0 0 25px rgba(var(--primary-rgb),0.4); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeInUp {
    opacity: 0; animation: fadeInUp 0.6s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* === UTILITIES === */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 30px; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .tool-detail-layout { grid-template-columns: 1fr; }
    .tool-spec-grid { grid-template-columns: 1fr; }
    .product-info-grid { grid-template-columns: 1fr; }
    .featured-content { grid-template-columns: 1fr; }
    .featured-img { max-height: 250px; }
}

@media (max-width: 768px) {
    :root { --nav-height: 62px; }
    body { font-size: 15px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.55rem; }
    h3 { font-size: 1.12rem; }

    .main-nav {
        height: var(--nav-height);
        border-bottom-color: rgba(var(--primary-rgb),0.28);
    }
    .nav-container { padding: 0 12px; }
    .nav-logo { font-size: 1.05rem; min-width: 0; }
    .logo-icon { font-size: 1.35rem; }
    .nav-actions { gap: 6px; }
    .nav-actions .btn { display: none; }
    .lang-selector { display: none; }
    .btn-icon { width: 34px; height: 34px; }
    .nav-menu {
        position: fixed;
        top: calc(var(--nav-height) + 8px);
        left: 10px;
        right: 10px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding: 14px;
        border: 1px solid rgba(var(--primary-rgb),0.28);
        border-radius: 22px;
        background:
            linear-gradient(145deg, rgba(13,20,36,0.94), rgba(18,13,39,0.9)),
            radial-gradient(circle at 12% 0%, rgba(var(--primary-rgb),0.2), transparent 34%);
        backdrop-filter: blur(24px) saturate(1.25);
        -webkit-backdrop-filter: blur(24px) saturate(1.25);
        transform: translateY(-120%) scale(0.96);
        opacity: 0;
        transform-origin: top center;
        transition: transform 240ms ease, opacity 180ms ease;
        box-shadow: 0 18px 55px rgba(0,0,0,0.58), 0 0 0 1px rgba(255,255,255,0.04) inset;
        max-height: calc(100svh - var(--nav-height) - 96px);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 2147482990;
    }
    .nav-menu::before {
        content: 'Menu principal';
        grid-column: 1 / -1;
        padding: 0 2px 4px;
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }
    .nav-menu.active {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    .nav-toggle { display: flex; }
    .nav-menu a {
        width: 100%;
        min-height: 52px;
        padding: 10px 11px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 9px;
        border-radius: 14px;
        border: 1px solid rgba(255,255,255,0.09);
        background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
        box-shadow: 0 10px 24px rgba(0,0,0,0.18);
        color: rgba(255,255,255,0.82);
        font-size: 0.86rem;
        font-weight: 800;
        text-align: left;
    }
    .nav-menu a.active,
    .nav-menu a:hover {
        color: #00131a;
        border-color: rgba(var(--primary-rgb),0.65);
        background: linear-gradient(135deg, var(--primary), #62efff);
        box-shadow: 0 10px 25px rgba(var(--primary-rgb),0.28);
    }
    .nav-menu .nav-icon {
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        background: rgba(var(--primary-rgb),0.13);
        color: var(--primary);
        font-size: 0.9rem;
        flex: 0 0 auto;
    }
    .nav-menu a.active .nav-icon,
    .nav-menu a:hover .nav-icon {
        background: rgba(0,0,0,0.12);
        color: #00131a;
    }
    .mobile-bottom-nav {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        min-height: calc(66px + env(safe-area-inset-bottom));
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        z-index: 2147483000;
        background: rgba(10,10,26,0.96);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid rgba(var(--primary-rgb),0.22);
        box-shadow: 0 -10px 28px rgba(0,0,0,0.38);
        transform: translateZ(0);
        will-change: transform;
    }
    .mobile-bottom-nav a {
        min-width: 0;
        min-height: 50px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        font-weight: 700;
    }
    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover {
        color: #000;
        background: var(--primary);
    }
    .mobile-bottom-nav span { font-size: 1.08rem; line-height: 1; }
    .mobile-bottom-nav small { font-size: 0.65rem; line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .mobile-scroll-top {
        position: fixed;
        right: 14px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 1px solid var(--glass-border);
        background: var(--primary);
        color: #000;
        font-weight: 900;
        z-index: 1190;
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
        transition: var(--transition);
    }
    .mobile-scroll-top.visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .android-webview .mobile-bottom-nav {
        display: grid !important;
        bottom: 8px;
        min-height: 68px;
        padding-bottom: 8px;
        border-radius: 18px 18px 0 0;
    }
    .android-webview .mobile-scroll-top {
        bottom: 88px;
    }
    .video-feed-shell {
        --video-feed-bottom-space: 76px;
        --video-feed-header-space: 112px;
        --video-reel-height: calc(100svh - var(--nav-height) - var(--video-feed-header-space) - var(--video-feed-bottom-space));
        margin-left: -12px;
        margin-right: -12px;
        padding: calc(var(--nav-height) + 6px) 8px calc(84px + env(safe-area-inset-bottom));
        min-height: 100svh;
        background: #000;
    }
    .video-feed-header {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: auto;
        margin: 0 0 8px;
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px 10px;
        padding: 9px;
        border-radius: 18px;
        background: linear-gradient(135deg, rgba(7,12,28,0.7), rgba(18,13,38,0.52));
        border-color: rgba(var(--primary-rgb),0.2);
        box-shadow: 0 8px 28px rgba(0,0,0,0.22);
        backdrop-filter: blur(16px) saturate(1.25);
        -webkit-backdrop-filter: blur(16px) saturate(1.25);
    }
    .video-feed-header > div:not(.video-feed-controls) {
        min-width: 0;
        flex: 1;
    }
    .video-feed-header h1 {
        max-width: 140px;
        margin: 0;
        font-size: 0.94rem;
        line-height: 1.05;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .video-feed-header p { display: none; }
    .video-feed-controls {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
        padding: 0;
    }
    .video-back,
    .feed-sound-toggle,
    .feed-refresh {
        min-width: 0;
        min-height: 36px;
        border-radius: 14px;
        background: rgba(5,9,24,0.38);
        border-color: rgba(255,255,255,0.11);
        box-shadow: 0 8px 18px rgba(0,0,0,0.18);
    }
    .feed-sound-toggle {
        width: 100%;
        padding: 0 8px;
        font-size: 0.68rem;
        white-space: nowrap;
    }
    .feed-refresh {
        width: 100%;
    }
    .vertical-video-feed {
        width: 100%;
        height: var(--video-reel-height);
        max-height: var(--video-reel-height);
        min-height: 420px;
        border-radius: 0;
        padding-top: 0;
        margin: 0;
        background: #000;
    }
    .video-reel-card {
        height: var(--video-reel-height);
        min-height: 420px;
        padding: 0;
        scroll-snap-align: start;
    }
    .reel-player {
        min-height: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        background: #000;
    }
    .reel-player video,
    .reel-player iframe {
        width: 100%;
        height: 100%;
        min-height: 100%;
        object-fit: cover;
        background: #000;
    }
    .reel-gradient {
        background:
            linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 22%, transparent 54%, rgba(0,0,0,0.88) 100%),
            linear-gradient(90deg, rgba(0,0,0,0.42) 0%, transparent 42%);
    }
    .reel-info { left: 12px; right: 74px; bottom: 18px; gap: 6px; }
    .reel-author { gap: 8px; }
    .reel-author span { width: 36px; height: 36px; }
    .reel-author strong { max-width: 122px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .reel-info h2 { font-size: 0.96rem; }
    .reel-info p { font-size: 0.82rem; max-height: 3.4rem; }
    .reel-actions {
        right: 8px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        gap: 7px;
    }
    .reel-actions button,
    .reel-actions a {
        width: 54px;
        min-height: 50px;
        border-radius: 17px;
        background: rgba(7,10,25,0.68);
        border-color: rgba(255,255,255,0.18);
        box-shadow: 0 10px 24px rgba(0,0,0,0.24);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    .reel-actions small {
        max-width: 46px;
        font-size: 0.52rem;
    }
    .feed-tabbar {
        width: calc(100% - 18px);
        bottom: calc(30px + env(safe-area-inset-bottom));
        padding: 8px;
        gap: 4px;
        border-radius: 21px;
    }
    .feed-tabbar a { min-height: 48px; font-size: 0.64rem; }
    .feed-plus-action {
        min-height: 56px;
        margin-top: -16px;
        border-radius: 18px;
    }
    .feed-plus-action span {
        width: 30px;
        height: 26px;
        font-size: 1.65rem;
    }
    .video-participation {
        align-items: flex-end;
        padding: calc(12px + env(safe-area-inset-top)) 8px calc(86px + env(safe-area-inset-bottom));
    }
    .participation-card {
        max-height: min(82svh, 760px);
        padding: 16px;
        border-radius: 20px 20px 18px 18px;
    }
    .video-upload-head { gap: 10px; margin-bottom: 14px; }
    .video-upload-head h2 { font-size: 1.25rem; }
    .video-upload-head p { font-size: 0.86rem; }
    .video-upload-head button {
        width: 36px;
        height: 36px;
        flex: 0 0 auto;
    }
    .video-watch-shell {
        grid-template-columns: 1fr;
        margin-bottom: 14px;
        padding: 12px;
        border-radius: 18px;
    }
    .video-watch-player,
    .video-watch-player video,
    .video-watch-player iframe {
        min-height: 58svh;
    }
    .video-watch-info h2 { font-size: 1.3rem; }
    .video-search-form { grid-template-columns: 1fr; }
    .video-gallery-panel { padding: 16px; }
    .video-gallery-head { flex-direction: column; }
    .video-gallery-grid { grid-template-columns: 1fr; }
    .participation-grid { grid-template-columns: 1fr; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .ad-rail { display: none; }
    .ad-slot-header_bottom {
        display: none !important;
    }
    html[data-page="recursos"] .ad-slot-resources_top,
    html[data-page="recursos"] .ad-slot-in_content_1,
    html[data-page="recurso-detail"] .ad-slot-resource_detail_top,
    html[data-page="recurso-detail"] .ad-slot-in_content_1 {
        display: none !important;
    }
    .video-layout, .profile-grid, .profile-dashboard { grid-template-columns: 1fr; }
    .chat-shell { grid-template-columns: 1fr; min-height: auto; }
    .chat-sidebar,
    .chat-panel { min-height: auto; padding: 16px; }
    .chat-conversation-list { max-height: 280px; }
    .chat-messages { min-height: 360px; max-height: 58vh; }
    .chat-bubble { width: min(88%, 620px); }
    .chat-compose { grid-template-columns: 1fr; }
    .video-submit { position: static; }
    .downloads-grid { grid-template-columns: 1fr; }
    .manuals-grid { grid-template-columns: repeat(2, 1fr); }
    .content-layout { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }

    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + 28px) 14px 42px;
        align-items: flex-start;
    }
    .hero-content { text-align: left; }
    .hero-badge { margin-bottom: 14px; }
    .badge-glow { padding: 7px 14px; font-size: 0.72rem; }
    .hero-title { font-size: 2.25rem; line-height: 1.05; margin-bottom: 14px; }
    .hero-subtitle { font-size: 0.98rem; margin-bottom: 18px; }
    .hero-cta { justify-content: stretch; margin-bottom: 24px; gap: 10px; }
    .hero-cta .btn { flex: 1 1 100%; min-height: 46px; }
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }
    .stat-item {
        padding: 10px 6px;
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.035);
    }
    .stat-number { font-size: 1.45rem; }
    .stat-label { font-size: 0.62rem; letter-spacing: 0; }

    .page-header { padding: calc(var(--nav-height) + 24px) 0 24px; }
    .page-title { font-size: 1.85rem; overflow-wrap: anywhere; }
    .page-subtitle { font-size: 0.95rem; }
    .section { padding: 38px 0; }
    .container { padding: 0 14px; }
    .section-header { margin-bottom: 26px; text-align: left; }
    .section-subtitle { margin: 0; font-size: 0.95rem; }

    .download-card { flex-direction: column; text-align: center; }
    .download-actions { flex-direction: row; justify-content: center; }
    .resources-filter {
        grid-template-columns: 1fr;
        padding: 12px;
        margin-bottom: 18px;
    }
    .resource-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 14px;
    }
    .resource-section-heading h2 { font-size: 1.18rem; }
    .resource-order-note { text-align: left; font-size: 0.8rem; }
    .resource-trending-panel {
        padding: 12px;
        margin-bottom: 20px;
    }
    .resource-trending-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
    }
    .resource-trend-card {
        flex: 0 0 86%;
        scroll-snap-align: start;
        grid-template-columns: 72px minmax(0, 1fr);
        min-height: 86px;
    }
    .resource-trend-media { width: 72px; }
    .resources-grid { grid-template-columns: 1fr; gap: 16px; }
    .resource-body { padding: 14px; }
    .resource-card-foot { align-items: stretch; }
    .resource-card-foot .btn { width: 100%; }
    .resource-detail-layout { grid-template-columns: 1fr; gap: 16px; }
    .resource-detail-media img,
    .resource-detail-media video,
    .resource-detail-media iframe {
        min-height: 240px;
        max-height: 56vh;
    }
    .resource-content,
    .download-sites,
    .payment-panel,
    .resource-gallery-strip,
    .resource-side-card { padding: 16px; }
    .download-sites-grid { grid-template-columns: 1fr; }
    .resource-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .payment-method-grid { grid-template-columns: 1fr; }
    .resource-detail-sidebar {
        position: static;
        display: block;
    }

    .tool-detail-hero { flex-direction: column; text-align: center; }
    .tool-detail-layout,
    .content-layout,
    .contact-layout { gap: 18px; }
    .tool-detail-hero,
    .tool-detail-description,
    .tool-spec-card,
    .sidebar-card,
    .product-info-card,
    .feature-card,
    .benefit-item,
    .profile-card,
    .profile-card-wide,
    .video-submit,
    .contact-form-card,
    .contact-card {
        padding: 18px;
        border-radius: var(--radius-md);
    }
    .tool-card-icon { height: 110px; }
    .tool-card-body { padding: 16px; }
    .filters-bar { padding: 12px; gap: 10px; }
    .filter-search { min-width: 100%; }
    .filter-categories { width: 100%; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 4px; }
    .filter-categories .btn { flex: 0 0 auto; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-control { min-height: 44px; font-size: 16px; }
    textarea.form-control { min-height: 120px; }
    .btn { min-height: 42px; padding: 10px 16px; }
    .table-like div { flex-direction: column; align-items: flex-start; }
    .video-frame { aspect-ratio: 16 / 9; }
    .video-body { padding: 18px; }
    .community-grid { grid-template-columns: 1fr; gap: 16px; }
    .footer-grid { gap: 20px; }
    .main-footer { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
    .tools-search-panel {
        top: calc(var(--nav-height) + 6px);
        padding: 12px;
        gap: 10px;
        display: grid;
        grid-template-columns: 1fr;
        overflow: hidden;
    }
    .tool-search-box .form-control {
        height: 46px;
        font-size: 0.86rem;
        padding-left: 40px;
        padding-right: 38px;
    }
    .tool-search-icon {
        left: 13px;
    }
    .tool-search-clear {
        right: 8px;
    }
    .tool-search-status {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 7px;
        padding: 8px 10px;
        border-radius: 12px;
    }
    .tool-search-status strong {
        font-size: 1.15rem;
    }
    .tools-search-panel .filter-categories {
        width: calc(100% + 24px);
        margin: 0 -12px -2px;
        padding: 0 12px 7px;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .tools-search-panel .filter-categories::-webkit-scrollbar {
        display: none;
    }
    .tools-search-panel .filter-categories::after {
        content: '';
        flex: 0 0 10px;
    }
    .tools-search-panel .filter-categories .btn {
        flex: 0 0 auto;
        min-width: max-content;
        max-width: 170px;
        min-height: 40px;
        padding: 0 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 13px;
        font-size: 0.72rem;
        line-height: 1.1;
        white-space: nowrap;
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    .manuals-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta .btn { width: 100%; max-width: 280px; }
    .filters-bar { flex-direction: column; }
    .filter-categories { justify-content: center; }
}
