/* ================================================
   BroadChannel Tools — Premium Dark Theme
   Professional Cybersecurity Tool Suite
   v2.0 — Smooth Animations & Premium Polish
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-input: #0d1117;
    --border: #2a3040;
    --border-focus: #3b82f6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient-1: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #06b6d4, #3b82f6);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, .15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
    background: rgba(17, 24, 39, .85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.site-logo span {
    opacity: .6;
    font-weight: 400;
}

.header-nav {
    display: flex;
    gap: 20px;
}

.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: color .2s;
}

.header-nav a:hover {
    color: var(--accent);
}

/* ===== HERO ===== */
.tool-hero {
    padding: 48px 24px 32px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.tool-hero .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 16px;
    border: 1px solid rgba(59, 130, 246, .2);
}

.tool-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-hero .subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== MAIN TOOL CARD ===== */
.tool-container {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
}

/* ===== FORM ELEMENTS ===== */
label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: .9rem;
    transition: all .2s;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select {
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row>* {
    flex: 1;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(59, 130, 246, .3);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: .8rem;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ===== RESULT/OUTPUT ===== */
.result-box {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: .875rem;
    word-break: break-all;
    position: relative;
    min-height: 60px;
}

.result-box.success {
    border-color: var(--success);
}

.result-box.danger {
    border-color: var(--danger);
}

.result-box.warning {
    border-color: var(--warning);
}

.result-label {
    position: absolute;
    top: -10px;
    left: 12px;
    background: var(--bg-card);
    padding: 0 8px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: .5px;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-size: .75rem;
    cursor: pointer;
    transition: all .2s;
}

.copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ===== STRENGTH METER ===== */
.strength-meter {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    margin: 12px 0;
    overflow: hidden;
}

.strength-meter-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease, background .4s ease;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.stat-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-xs);
    font-weight: 500;
    font-size: .85rem;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
}

.tab.active {
    background: var(--accent);
    color: #fff;
}

.tab:hover:not(.active) {
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== TOGGLE ===== */
.toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.toggle-chip {
    padding: 6px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: .8rem;
    cursor: pointer;
    transition: all .2s;
    color: var(--text-secondary);
    user-select: none;
}

.toggle-chip.active,
.toggle-chip:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== TABLE ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: .85rem;
}

.data-table th,
.data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .5px;
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, .05);
}

/* ===== SEO CONTENT SECTION ===== */
.seo-content {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 32px 0 12px;
    color: var(--text-primary);
}

.seo-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--text-primary);
}

.seo-content p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: .95rem;
}

.seo-content ul,
.seo-content ol {
    color: var(--text-secondary);
    padding-left: 24px;
    margin-bottom: 12px;
}

.seo-content li {
    margin-bottom: 6px;
    font-size: .95rem;
}

.seo-content a {
    color: var(--accent);
    text-decoration: none;
}

.seo-content a:hover {
    text-decoration: underline;
}

/* ===== FAQ ACCORDION ===== */
.faq-section {
    margin-top: 32px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    cursor: pointer;
    font-weight: 600;
    font-size: .95rem;
    transition: background .2s;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform .3s;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    padding: 0 20px;
    color: var(--text-secondary);
    font-size: .9rem;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 16px;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .85rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-muted);
    font-size: .8rem;
}

/* ===== RELATED TOOLS ===== */
.related-tools {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.related-tools h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: .9rem;
    transition: all .2s;
}

.tool-link:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.tool-link .icon {
    font-size: 1.3rem;
}

/* ===== LOADING ===== */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}



/* ==============================================
   PREMIUM ANIMATIONS & SMOOTH EFFECTS v2.0
   ============================================== */

/* --- Global Smooth Transitions --- */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Scroll-Reveal Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, .1);
    }

    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, .2);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 4s ease-in-out infinite;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Page Load Cascade --- */
.fade-in {
    animation: fadeInUp .6s ease both;
}

.tool-hero {
    animation: fadeInDown .7s ease both;
}

.tool-hero .badge {
    animation: fadeInScale .5s ease .2s both;
}

.tool-hero h1 {
    animation: fadeInUp .6s ease .1s both;
}

.tool-hero .subtitle {
    animation: fadeInUp .6s ease .2s both;
}

.tool-card {
    animation: fadeInUp .6s ease .3s both;
}

/* --- Staggered Grid Animations --- */
.stats-grid .stat-card:nth-child(1) {
    animation: fadeInUp .5s ease .1s both;
}

.stats-grid .stat-card:nth-child(2) {
    animation: fadeInUp .5s ease .2s both;
}

.stats-grid .stat-card:nth-child(3) {
    animation: fadeInUp .5s ease .3s both;
}

.stats-grid .stat-card:nth-child(4) {
    animation: fadeInUp .5s ease .4s both;
}

.stats-grid .stat-card:nth-child(5) {
    animation: fadeInUp .5s ease .5s both;
}

.tools-grid .tool-link:nth-child(1) {
    animation: fadeInUp .4s ease .05s both;
}

.tools-grid .tool-link:nth-child(2) {
    animation: fadeInUp .4s ease .1s both;
}

.tools-grid .tool-link:nth-child(3) {
    animation: fadeInUp .4s ease .15s both;
}

.tools-grid .tool-link:nth-child(4) {
    animation: fadeInUp .4s ease .2s both;
}

/* --- Enhanced Header Glassmorphism --- */
.site-header {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    transition: all .35s ease;
}

.site-header:hover {
    background: rgba(17, 24, 39, .92);
}

.site-logo {
    transition: transform .3s ease, filter .3s ease;
}

.site-logo:hover {
    transform: scale(1.03);
    filter: brightness(1.2);
}

.header-nav a {
    transition: color .25s ease, transform .25s ease;
    position: relative;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 1px;
    transition: width .3s ease;
}

.header-nav a:hover::after {
    width: 100%;
}

.header-nav a:hover {
    transform: translateY(-1px);
}

/* --- Tool Card Premium Hover --- */
.tool-card {
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .4), 0 0 30px rgba(59, 130, 246, .08);
    border-color: rgba(59, 130, 246, .3);
}

.tool-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(59, 130, 246, .1), transparent 40%, transparent 60%, rgba(139, 92, 246, .1));
    z-index: -1;
    opacity: 0;
    transition: opacity .4s ease;
}

.tool-card:hover::after {
    opacity: 1;
}

/* --- Stat Card Interactions --- */
.stat-card {
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, background .3s ease;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .3), 0 0 15px rgba(59, 130, 246, .1);
    border-color: rgba(59, 130, 246, .4);
    background: rgba(59, 130, 246, .05);
}

.stat-value {
    transition: transform .3s ease;
}

.stat-card:hover .stat-value {
    transform: scale(1.08);
}

/* --- Button Premium Effects --- */
.btn {
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    transform: translate(-50%, -50%);
    transition: width .4s ease, height .4s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, .4), 0 0 40px rgba(59, 130, 246, .15);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(59, 130, 246, .3);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, .2);
    background: rgba(59, 130, 246, .05);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* --- Input Focus Glow --- */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(59, 130, 246, .08);
    transform: scale(1.005);
}

input,
textarea,
select {
    transition: border-color .3s ease, box-shadow .3s ease, transform .2s ease;
}

/* --- Toggle Chip Bounce --- */
.toggle-chip {
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}

.toggle-chip:active {
    transform: scale(0.96);
}

.toggle-chip.active {
    box-shadow: 0 0 12px rgba(59, 130, 246, .2);
}

/* --- Table Row Slide --- */
.data-table tr {
    transition: background .25s ease;
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, .06);
    transition: background .25s ease;
}

/* --- FAQ Smooth Open/Close --- */
.faq-answer {
    transition: max-height .4s cubic-bezier(0.4, 0, 0.2, 1), padding .4s ease, opacity .3s ease;
    opacity: 0;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 16px;
    opacity: 1;
}

.faq-question {
    transition: background .3s ease, padding-left .3s ease;
}

.faq-item.open .faq-question {
    padding-left: 24px;
    background: rgba(59, 130, 246, .05);
}

.faq-question::after {
    transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1), color .3s ease;
}

.faq-item.open .faq-question::after {
    color: var(--accent);
}

/* --- Copy Button Feedback --- */
.copy-btn {
    transition: all .25s ease, transform .2s ease;
}

.copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, .15);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* --- Tool Link Cards Hover --- */
.tool-link {
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, .04), transparent);
    transition: left .5s ease;
}

.tool-link:hover::before {
    left: 100%;
}

.tool-link:hover {
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .3), 0 0 20px rgba(59, 130, 246, .1);
}

.tool-link:active {
    transform: translateY(-1px) scale(0.99);
}

.tool-link .icon {
    transition: transform .3s ease;
}

.tool-link:hover .icon {
    transform: scale(1.2) rotate(-5deg);
}

/* --- Result Box Glow on Content --- */
.result-box {
    transition: border-color .3s ease, box-shadow .3s ease;
}

.result-box.success {
    box-shadow: 0 0 15px rgba(16, 185, 129, .1);
    animation: pulseGlow 2s ease infinite;
}

.result-box.danger {
    box-shadow: 0 0 15px rgba(239, 68, 68, .1);
}

/* --- Strength Meter Smooth --- */
.strength-meter-fill {
    transition: width .5s cubic-bezier(0.4, 0, 0.2, 1), background .5s ease;
}

.strength-meter {
    overflow: hidden;
    position: relative;
}

.strength-meter::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
    animation: shimmer 2s ease infinite;
}

/* --- Tabs Smooth Switch --- */
.tab {
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab.active {
    box-shadow: 0 2px 10px rgba(59, 130, 246, .3);
}

.tab:hover:not(.active) {
    background: rgba(59, 130, 246, .08);
}

/* --- Footer Links --- */
.footer-links a {
    transition: color .25s ease, transform .25s ease;
}

.footer-links a:hover {
    transform: translateY(-1px);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* --- Selection Color --- */
::selection {
    background: rgba(59, 130, 246, .3);
    color: #fff;
}

/* --- Loading Spinner --- */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

/* --- Badge Pulse --- */
.tool-hero .badge {
    position: relative;
}

.tool-hero .badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    background: var(--gradient-1);
    opacity: 0;
    z-index: -1;
    animation: pulseGlow 3s ease infinite;
}

/* ===== AD SLOTS ===== */
.ad-slot {
    margin: 20px 0;
    padding: 0;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: 0;
    overflow: hidden;
}

/* ===== SCHEMA HIDDEN ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ===== SCROLL REVEAL ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s cubic-bezier(0.4, 0, 0.2, 1), transform .6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE
   ============================================ */

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .tool-container {
        max-width: 100%;
        padding: 0 16px;
    }

    .seo-content {
        padding: 0 16px;
    }

    .related-tools {
        padding: 0 16px;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {

    /* Header */
    .header-nav {
        display: none;
    }

    .header-inner {
        padding: 0 16px;
    }

    .site-logo {
        font-size: 1.1rem;
    }

    /* Hero Section */
    .tool-hero {
        padding: 32px 16px 20px;
    }

    .tool-hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .tool-hero .subtitle {
        font-size: .9rem;
    }

    .tool-hero .badge {
        font-size: .7rem;
        padding: 5px 12px;
        margin-bottom: 12px;
    }

    /* Tools Hero (index page) */
    .tools-hero {
        padding: 40px 16px 28px;
    }

    .tools-hero h1 {
        font-size: 1.8rem;
    }

    .tools-hero p {
        font-size: .9rem;
    }

    .tools-hero .stats {
        gap: 24px;
    }

    .tools-hero .stat-num {
        font-size: 1.5rem;
    }

    .tools-hero .stat-txt {
        font-size: .7rem;
    }

    /* Search box */
    .search-box {
        padding: 0 16px;
        margin-bottom: 24px;
    }

    .search-box input {
        padding: 12px 16px 12px 42px;
        font-size: .9rem;
        background-size: 18px;
        background-position: 14px center;
    }

    /* Category sections (index) */
    .category {
        padding: 0 16px;
        margin: 24px auto;
    }

    .category h2 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .category h2 .cat-icon {
        font-size: 1.3rem;
    }

    .tools-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tool-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .tool-item .t-icon {
        font-size: 1.3rem;
    }

    .tool-item .t-name {
        font-size: .88rem;
    }

    .tool-item .t-desc {
        font-size: .75rem;
    }

    /* Tool Container & Cards */
    .tool-container {
        max-width: 100%;
        margin: 0 auto 24px;
        padding: 0 12px;
    }

    .tool-card {
        padding: 16px;
        border-radius: 10px;
    }

    /* Forms */
    .form-group {
        margin-bottom: 14px;
    }

    label {
        font-size: .78rem;
        margin-bottom: 5px;
    }

    input[type="text"],
    input[type="number"],
    input[type="url"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        padding: 10px 12px;
        font-size: .82rem;
    }

    textarea {
        min-height: 90px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: .82rem;
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }

    .btn-sm {
        padding: 8px 14px;
        font-size: .75rem;
    }

    /* Tabs */
    .tabs {
        margin-bottom: 14px;
    }

    .tab {
        padding: 8px 10px;
        font-size: .78rem;
    }

    /* Toggle chips */
    .toggle-group {
        gap: 6px;
    }

    .toggle-chip {
        padding: 5px 10px;
        font-size: .73rem;
    }

    /* Results */
    .result-box {
        margin-top: 16px;
        padding: 14px;
        font-size: .8rem;
        min-height: 50px;
    }

    .copy-btn {
        padding: 3px 8px;
        font-size: .7rem;
        top: 6px;
        right: 6px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 14px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: .7rem;
    }

    /* Tables — horizontal scroll on mobile */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: .78rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .data-table th {
        font-size: .7rem;
    }

    /* SEO Content */
    .seo-content {
        padding: 0 16px;
        margin: 0 auto 40px;
    }

    .seo-content h2 {
        font-size: 1.25rem;
        margin: 24px 0 10px;
    }

    .seo-content h3 {
        font-size: 1rem;
        margin: 18px 0 6px;
    }

    .seo-content p {
        font-size: .88rem;
        line-height: 1.55;
    }

    .seo-content ul,
    .seo-content ol {
        padding-left: 18px;
    }

    .seo-content li {
        font-size: .88rem;
        margin-bottom: 5px;
    }

    /* FAQ */
    .faq-question {
        padding: 12px 14px;
        font-size: .88rem;
    }

    .faq-answer {
        font-size: .82rem;
    }

    .faq-item.open .faq-answer {
        padding: 0 14px 12px;
    }

    .faq-item.open .faq-question {
        padding-left: 18px;
    }

    /* Related Tools */
    .related-tools {
        padding: 0 16px;
        margin: 0 auto 24px;
    }

    .related-tools h3 {
        font-size: .95rem;
        margin-bottom: 12px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tool-link {
        padding: 12px 14px;
        font-size: .82rem;
        gap: 10px;
    }

    .tool-link .icon {
        font-size: 1.1rem;
    }

    /* Footer */
    .site-footer {
        padding: 24px 16px;
        margin-top: 32px;
    }

    .footer-links {
        gap: 16px;
        margin-bottom: 12px;
    }

    .footer-links a {
        font-size: .78rem;
    }

    .footer-copy {
        font-size: .72rem;
    }

    /* Ad slots mobile */
    .ad-slot {
        margin: 16px 0;
    }

    /* Reduce animations on mobile for performance */
    *,
    *::before,
    *::after {
        animation-duration: 0.3s !important;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    .tool-card:hover {
        transform: none;
    }

    .tool-link:hover {
        transform: none;
    }

    .tool-item:hover {
        transform: none;
    }
}

/* --- Small Phones (max-width: 480px) --- */
@media (max-width: 480px) {
    .tool-hero {
        padding: 24px 12px 16px;
    }

    .tool-hero h1 {
        font-size: 1.3rem;
    }

    .tool-hero .subtitle {
        font-size: .82rem;
    }

    .tools-hero h1 {
        font-size: 1.5rem;
    }

    .tools-hero .stats {
        gap: 16px;
    }

    .tools-hero .stat-num {
        font-size: 1.3rem;
    }

    .tool-container {
        padding: 0 10px;
    }

    .tool-card {
        padding: 14px;
    }

    .btn {
        padding: 9px 14px;
        font-size: .78rem;
    }

    .btn-group {
        gap: 6px;
    }

    .tab {
        padding: 7px 8px;
        font-size: .72rem;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: .65rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .category {
        padding: 0 12px;
        margin: 20px auto;
    }

    .category h2 {
        font-size: 1.05rem;
    }

    .tool-item {
        padding: 12px 14px;
    }

    .seo-content {
        padding: 0 12px;
    }

    .seo-content h2 {
        font-size: 1.15rem;
    }

    .seo-content h3 {
        font-size: .95rem;
    }

    .seo-content p,
    .seo-content li {
        font-size: .82rem;
    }

    .faq-question {
        padding: 10px 12px;
        font-size: .82rem;
    }

    .related-tools {
        padding: 0 12px;
    }

    .site-footer {
        padding: 20px 12px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}