:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #f43f5e;
    --warning-color: #f59e0b;
    --info-color: #8b5cf6;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --label-color: #1e293b;
    --border-color: #cbd5e1;
    --input-bg: #ffffff;
    --input-text: #0f172a;
    --placeholder-color: #64748b;
    --light-bg: var(--bg-primary);
    --dark-bg: #0f172a;
    --light-text: #0f172a;
    --dark-text: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(203, 213, 225, 0.8);
    --surface-soft: #eef2ff;
    --muted-text: #1e293b;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 24px 60px rgba(99, 102, 241, 0.18);
    --transition: all 0.28s ease;
}

body[data-theme="dark"] {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #f43f5e;
    --warning-color: #f59e0b;
    --info-color: #8b5cf6;
    --bg-primary: #0b1120;
    --bg-secondary: #020617;
    --card-bg: #111827;
    --text-primary: #e5eefb;
    --text-secondary: #cbd5e1;
    --label-color: #e5eefb;
    --border-color: rgba(148, 163, 184, 0.2);
    --input-bg: rgba(15, 23, 42, 0.9);
    --input-text: #e5eefb;
    --placeholder-color: #94a3b8;
    --light-bg: #0b1120;
    --dark-bg: #020617;
    --light-text: #e5eefb;
    --dark-text: #e5eefb;
    --glass-bg: rgba(15, 23, 42, 0.72);
    --glass-border: rgba(148, 163, 184, 0.18);
    --surface-soft: #111827;
    --muted-text: #cbd5e1;
    --shadow: 0 22px 60px rgba(2, 6, 23, 0.45);
    --shadow-hover: 0 28px 70px rgba(16, 185, 129, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.65;
    color: var(--light-text);
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.13), transparent 28%),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.1), transparent 24%),
        radial-gradient(circle at bottom center, rgba(16, 185, 129, 0.12), transparent 28%),
        var(--light-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.32;
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: -4rem;
    left: -4rem;
    background: rgba(99, 102, 241, 0.24);
}

body::after {
    right: -5rem;
    bottom: 0;
    background: rgba(236, 72, 153, 0.18);
}

img,
canvas,
svg,
video {
    max-width: 100%;
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.9rem 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(236, 72, 153, 0.9) 50%, rgba(16, 185, 129, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: navbarSlideIn 0.8s ease-out;
    transition: all 0.3s ease;
}

@keyframes navbarSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

body[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(99, 102, 241, 0.8) 50%, rgba(236, 72, 153, 0.8) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(45deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 2s ease-in-out infinite alternate;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo h1:hover {
    transform: scale(1.05);
    animation-duration: 0.5s;
}

@keyframes logoGlow {
    from {
        filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(236, 72, 153, 0.8));
    }
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

nav a:hover::before {
    left: 100%;
}

nav a:hover,
nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#theme-toggle {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.15rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: themeTogglePulse 3s ease-in-out infinite;
}

@keyframes themeTogglePulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    }
}

#theme-toggle:hover {
    transform: translateY(-2px) rotate(180deg) scale(1.1);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

main section {
    padding: 4.5rem 0;
    position: relative;
}

.hero {
    padding: 5.5rem 0 4.5rem;
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    filter: blur(50px);
}

.hero::before {
    width: 14rem;
    height: 14rem;
    top: -3rem;
    left: 0rem;
    background: rgba(99, 102, 241, 0.15);
}

.hero::after {
    width: 18rem;
    height: 18rem;
    right: -4rem;
    bottom: -4rem;
    background: rgba(236, 72, 153, 0.12);
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.2rem;
    justify-items: center;
    text-align: center;
}

.hero-badge,
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(10px);
    color: #e5e7eb;
}

.section-badge {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.18);
    color: var(--primary-color);
}

.hero h1,
.hero h2 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    max-width: 900px;
    color: #e5e7eb;
}

.hero p {
    max-width: 760px;
    font-size: 1.05rem;
    color: #cbd5e1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

.hero-stats {
    width: 100%;
    max-width: 860px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.4rem;
}

.stat-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12);
}

.stat-card strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #e5e7eb;
}

.stat-card span {
    font-size: 0.92rem;
    color: #cbd5e1;
}

.search-container {
    width: min(720px, 100%);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0.65rem;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.18);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

#search-bar,
#search-btn,
.btn,
.btn-primary,
.btn-secondary,
.tool-btn {
    border: none;
    border-radius: 14px;
    font: inherit;
}

#search-bar {
    width: 100%;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    border: 1px solid transparent;
}

#search-bar::placeholder {
    color: #64748b;
}

#search-bar:focus,
input:focus,
textarea:focus,
select:focus,
.input-field:focus,
.output-field:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

#search-btn,
.btn,
.btn-primary,
.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.95rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(99, 102, 241, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

#search-btn:hover,
.btn:hover,
.btn-primary:hover,
.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(99, 102, 241, 0.28);
}

#search-btn:active,
.btn:active,
.btn-primary:active,
.btn-secondary:active,
.tool-btn:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.15rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.85), rgba(99, 102, 241, 0.85));
    color: #fff;
    border: 1px solid rgba(236, 72, 153, 0.5);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 1), rgba(99, 102, 241, 0.95));
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(236, 72, 153, 0.5);
    border-color: rgba(236, 72, 153, 0.8);
}

section > .container > h2 {
    font-size: clamp(1.55rem, 2.7vw, 2.2rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

main > section:not(.hero) .container {
    display: grid;
    gap: 1.5rem;
}

.section-header {
    display: grid;
    gap: 0.7rem;
    max-width: 760px;
    margin: 0 auto 0.5rem;
    text-align: center;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-header p,
.search-status {
    color: var(--muted-text);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.15rem;
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.8rem;
    min-height: 100%;
    padding: 1.2rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

body[data-theme="dark"] .tool-card {
    background: linear-gradient(180deg, rgba(15,23,42,0.88), rgba(17,24,39,0.92));
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--success-color));
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.24);
    box-shadow: var(--shadow-hover);
}

.tool-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.08rem;
    color: var(--light-text);
    line-height: 1.35;
}

.tool-card h3::before {
    content: '✦';
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.22);
}

.tool-card:nth-child(3n + 2) h3::before {
    content: '⚡';
    background: linear-gradient(135deg, var(--secondary-color), #fb7185);
}

.tool-card:nth-child(3n) h3::before {
    content: '✓';
    background: linear-gradient(135deg, var(--success-color), #14b8a6);
}

.tool-card p {
    color: var(--muted-text);
    font-size: 0.95rem;
}

.tool-card a {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.78rem 1rem;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.09);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.tool-card a::after {
    content: '→';
    transition: transform 0.2s ease;
}

.tool-card a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

.tool-card a:hover::after {
    transform: translateX(2px);
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.tab-btn {
    padding: 0.78rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--glass-bg);
    color: var(--light-text);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
}

.tab-btn.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.22);
}

.category-content {
    display: none;
    gap: 1.15rem;
}

.category-content.active {
    display: grid;
}

main .tool-container {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 1.25rem;
    align-items: start;
}

main .tool-input,
main .tool-output,
main .content-card,
main .contact-form,
main > section:not(.hero) .container > p,
main > section:not(.hero) .container > ul,
main > section:not(.hero) .container > ol {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

main .tool-input,
main .tool-output,
main .content-card,
main .contact-form {
    padding: 1.35rem;
}

main > section:not(.hero) .container > p,
main > section:not(.hero) .container > ul,
main > section:not(.hero) .container > ol {
    padding: 1rem 1.1rem;
}

main .tool-input h2,
main .tool-output h2,
main .content-card h2,
main .tool-input h3,
main .tool-output h3 {
    margin-bottom: 0.4rem;
    color: var(--light-text);
}

.card-heading p,
main .content-card > p,
main .mini-note {
    color: var(--muted-text);
}

.form-grid,
.content-grid {
    display: grid;
    gap: 1rem;
}

.content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group,
.button-row {
    display: grid;
    gap: 0.55rem;
}

.button-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
    align-items: center;
}

label {
    display: inline-block;
    font-weight: 700;
    color: var(--light-text);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
textarea,
select,
.input-field,
.output-field {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--light-text);
    font-family: inherit;
    font-size: 0.98rem;
    transition: var(--transition);
}

body[data-theme="dark"] input[type="text"],
body[data-theme="dark"] input[type="number"],
body[data-theme="dark"] input[type="email"],
body[data-theme="dark"] input[type="password"],
body[data-theme="dark"] input[type="date"],
body[data-theme="dark"] input[type="file"],
body[data-theme="dark"] textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] .input-field,
body[data-theme="dark"] .output-field,
body[data-theme="dark"] #search-bar {
    background: rgba(15, 23, 42, 0.9);
    color: var(--light-text);
}

textarea,
.output-field {
    min-height: 140px;
    resize: vertical;
}

main .tool-output > p,
main .tool-output > div,
main .tool-output > pre {
    border-radius: 16px;
}

.result-card,
main .tool-output > div:not(.card-heading):not(.button-row) {
    padding: 1rem;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.12);
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(15, 23, 42, 0.04);
    padding: 1rem;
    border-radius: 14px;
}

body[data-theme="dark"] pre {
    background: rgba(2, 6, 23, 0.55);
}

main .faq {
    display: grid;
    gap: 0.75rem;
}

main .faq > h3,
main .faq .faq-item {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: rgba(99, 102, 241, 0.05);
}

main .faq > h3 {
    position: relative;
    margin: 0;
    cursor: pointer;
    transition: var(--transition);
}

main .faq > h3::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--primary-color);
}

main .faq > h3.is-open {
    background: rgba(99, 102, 241, 0.1);
}

main .faq > h3.is-open::after {
    content: '–';
}

main .faq > p {
    margin-top: -0.5rem;
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    color: var(--muted-text);
    border: 1px solid transparent;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
}

main .faq > p.is-open {
    max-height: 220px;
    opacity: 1;
    padding: 0.15rem 1rem 1rem;
    border-color: var(--border-color);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: rgba(255, 255, 255, 0.45);
}

body[data-theme="dark"] main .faq > p.is-open {
    background: rgba(15, 23, 42, 0.45);
}

main .related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
}

main .related-tools a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-weight: 700;
    transition: var(--transition);
}

main .related-tools a::after {
    content: '↗';
}

main .related-tools a:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.14);
}

.benefits-list {
    display: grid;
    gap: 0.7rem;
    list-style: none;
}

.benefits-list li,
main ul li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--muted-text);
}

.benefits-list li::before,
main ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 900;
}

main ol {
    padding-left: 1.2rem;
}

main ol li {
    margin-bottom: 0.6rem;
    color: var(--muted-text);
}

.contact-form {
    width: min(700px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.featured-tools,
.categories {
    position: relative;
}

footer {
    margin-top: 3rem;
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(2, 6, 23, 1) 50%, rgba(99, 102, 241, 0.8) 100%);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
    animation: footerFadeIn 1s ease-out;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: footerParticles 8s ease-in-out infinite alternate;
}

@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes footerParticles {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

footer p {
    color: #cbd5e1;
    font-weight: 500;
    animation: footerTextGlow 3s ease-in-out infinite alternate;
}

@keyframes footerTextGlow {
    from {
        text-shadow: 0 0 5px rgba(165, 180, 252, 0.3);
    }
    to {
        text-shadow: 0 0 15px rgba(165, 180, 252, 0.6);
    }
}

footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

footer a {
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #ec4899, #10b981);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

footer a:hover {
    color: #a5b4fc;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(165, 180, 252, 0.5);
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   UNIFIED TOOL PAGE DESIGN SYSTEM
   Enhanced spacing, padding, margins for all tools
   ============================================ */

/* Tool Container - Main Layout */
.tool-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.tool-input,
.tool-output {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
    transition: all 0.3s ease;
}

.tool-input:hover,
.tool-output:hover {
    border-color: rgba(99, 102, 241, 0.24);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}

/* Card Heading */
.card-heading {
    margin-bottom: 1.8rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.card-heading h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366F1, #EC4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-heading p {
    color: #a1a1aa;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.95rem 1.1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--input-text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.28s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366F1;
    background: var(--input-bg);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Button Row - Enhanced Spacing */
.button-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.button-row button {
    flex: 1;
    min-width: 140px;
    padding: 1rem 1.4rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.28s ease;
    border: none;
}

.tool-btn {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.tool-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #7c3aed, #a081d8);
}

.tool-btn:active {
    transform: translateY(-1px);
}

/* Result Card */
.result-card {
    padding: 1.8rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.08));
    border: 1px solid rgba(236, 72, 153, 0.2);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.8;
    margin: 1.5rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card strong {
    color: #EC4899;
    font-weight: 700;
}

/* Content Grid - Two Column Layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

/* Content Card - Reusable Section Styling */
.content-card {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
    transition: all 0.3s ease;
}

.content-card:hover {
    border-color: rgba(99, 102, 241, 0.24);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.content-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #6366F1, #EC4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.content-card h3:first-child {
    margin-top: 0;
}

.content-card ol,
.content-card ul {
    list-style-position: inside;
    margin-left: 0;
    padding-left: 0;
}

.content-card li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.95rem;
    padding-left: 0.5rem;
}

.content-card p {
    color: #cbd5f5;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Benefits List Styling */
.benefits-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.benefits-list li:before {
    content: "✓";
    color: #10B981;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    font-size: 0.9rem;
}

.benefits-list li:last-child {
    border-bottom: none;
}

/* FAQ Section */
.faq {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.faq h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #6366F1;
    cursor: pointer;
}

.faq p {
    color: var(--text-secondary);
    margin: 0.8rem 0 0 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Related Tools */
.related-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.related-tools a {
    display: inline-block;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #cbd5f5;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.28s ease;
}

.related-tools a:hover {
    background: linear-gradient(135deg, #6366F1, #EC4899);
    color: #fff;
    border-color: #6366F1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* Mini Note */
.mini-note {
    font-size: 0.9rem;
    color: #a1a1aa;
    font-style: italic;
    margin: 1rem 0 0 0;
    padding: 1rem;
    border-left: 3px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
    border-radius: 8px;
}

/* Light mode contrast and accessibility fixes */
body:not([data-theme="dark"]) {
    color: var(--text-primary);
}

body:not([data-theme="dark"]) h1,
body:not([data-theme="dark"]) h2,
body:not([data-theme="dark"]) h3,
body:not([data-theme="dark"]) h4,
body:not([data-theme="dark"]) h5,
body:not([data-theme="dark"]) h6,
body:not([data-theme="dark"]) .tool-card h3,
body:not([data-theme="dark"]) .content-card h3,
body:not([data-theme="dark"]) .faq h3 {
    color: var(--text-primary);
}

body:not([data-theme="dark"]) p,
body:not([data-theme="dark"]) li,
body:not([data-theme="dark"]) span,
body:not([data-theme="dark"]) .tool-card p,
body:not([data-theme="dark"]) .content-card p,
body:not([data-theme="dark"]) .content-card li,
body:not([data-theme="dark"]) .faq p,
body:not([data-theme="dark"]) .mini-note,
body:not([data-theme="dark"]) .section-header p,
body:not([data-theme="dark"]) .search-status,
body:not([data-theme="dark"]) .stat-card span,
body:not([data-theme="dark"]) .stat-card strong {
    color: var(--text-secondary);
}

body:not([data-theme="dark"]) label,
body:not([data-theme="dark"]) .faq h3 {
    color: var(--label-color);
}

body:not([data-theme="dark"]) input,
body:not([data-theme="dark"]) textarea,
body:not([data-theme="dark"]) select,
body:not([data-theme="dark"]) .input-field,
body:not([data-theme="dark"]) .output-field,
body:not([data-theme="dark"]) #search-bar {
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
}

body:not([data-theme="dark"]) input::placeholder,
body:not([data-theme="dark"]) textarea::placeholder,
body:not([data-theme="dark"]) select::placeholder,
body:not([data-theme="dark"]) #search-bar::placeholder,
body:not([data-theme="dark"]) ::placeholder {
    color: var(--placeholder-color);
    opacity: 1;
}

body:not([data-theme="dark"]) #search-bar,
body:not([data-theme="dark"]) .search-container,
body:not([data-theme="dark"]) .tool-card,
body:not([data-theme="dark"]) .content-card,
body:not([data-theme="dark"]) .result-card,
body:not([data-theme="dark"]) .faq,
body:not([data-theme="dark"]) .related-tools a,
body:not([data-theme="dark"]) .mini-note,
body:not([data-theme="dark"]) .tool-input,
body:not([data-theme="dark"]) .tool-output,
body:not([data-theme="dark"]) .contact-form,
body:not([data-theme="dark"]) main > section:not(.hero) .container > p,
body:not([data-theme="dark"]) main > section:not(.hero) .container > ul,
body:not([data-theme="dark"]) main > section:not(.hero) .container > ol {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body:not([data-theme="dark"]) .search-container {
    background: var(--card-bg);
}

body:not([data-theme="dark"]) .stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body:not([data-theme="dark"]) .stat-card strong,
body:not([data-theme="dark"]) .stat-card span {
    color: var(--text-primary);
}

body:not([data-theme="dark"]) .tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body:not([data-theme="dark"]) .tool-card h3 {
    color: var(--text-primary);
}

body:not([data-theme="dark"]) .tool-card p {
    color: var(--text-secondary);
}

body:not([data-theme="dark"]) .tool-card a {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

body:not([data-theme="dark"]) .tool-card a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

body:not([data-theme="dark"]) .content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

body:not([data-theme="dark"]) .content-card:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body:not([data-theme="dark"]) .content-card h3 {
    color: var(--text-primary);
}

body:not([data-theme="dark"]) .content-card p,
body:not([data-theme="dark"]) .content-card li {
    color: var(--text-secondary);
}

body:not([data-theme="dark"]) .result-card {
    background: var(--result-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

body:not([data-theme="dark"]) .result-card strong {
    color: var(--secondary-color);
}

body:not([data-theme="dark"]) .faq {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 18px;
}

body:not([data-theme="dark"]) .faq h3 {
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
}

body:not([data-theme="dark"]) .faq p {
    color: var(--text-secondary);
}

body:not([data-theme="dark"]) .related-tools a {
    background: rgba(226, 232, 240, 0.7);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not([data-theme="dark"]) .related-tools a:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
}

body:not([data-theme="dark"]) .mini-note {
    background: rgba(226, 232, 240, 0.65);
    color: var(--text-secondary);
    border-left-color: rgba(99, 102, 241, 0.3);
}

body:not([data-theme="dark"]) .btn:hover,
body:not([data-theme="dark"]) .btn-primary:hover,
body:not([data-theme="dark"]) .tool-btn:hover,
body:not([data-theme="dark"]) #search-btn:hover {
    filter: brightness(0.95);
    box-shadow: 0 18px 34px rgba(99, 102, 241, 0.22);
}

/* FINAL OVERRIDE FOR LIGHT MODE VISIBILITY */
body:not([data-theme="dark"]) {
    color: #0f172a !important;
    background: #f8fafc !important;
}

body:not([data-theme="dark"]) h1,
body:not([data-theme="dark"]) h2,
body:not([data-theme="dark"]) h3 {
    color: #0f172a !important;
}

body:not([data-theme="dark"]) .hero {
    background: linear-gradient(135deg, #eef2ff, #f8fafc) !important;
    color: #0f172a !important;
}

body:not([data-theme="dark"]) .hero::before,
body:not([data-theme="dark"]) .hero::after {
    opacity: 0 !important;
    background: transparent !important;
}

body:not([data-theme="dark"]) .hero h1,
body:not([data-theme="dark"]) .hero h2 {
    color: #0f172a !important;
}

body:not([data-theme="dark"]) .hero p {
    color: #334155 !important;
}

body:not([data-theme="dark"]) .hero-badge {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    color: #0f172a !important;
}

body:not([data-theme="dark"]) .stat-card {
    background: rgba(99, 102, 241, 0.05) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

body:not([data-theme="dark"]) .stat-card strong {
    color: #0f172a !important;
}

body:not([data-theme="dark"]) .stat-card span {
    color: #334155 !important;
}

body:not([data-theme="dark"]) .search-container {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
}

body:not([data-theme="dark"]) footer {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, rgba(99, 102, 241, 0.05) 100%) !important;
    color: #0f172a !important;
}

body:not([data-theme="dark"]) footer::before {
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 50%) !important;
}

body:not([data-theme="dark"]) footer p {
    color: #334155 !important;
    animation: none !important;
    text-shadow: none !important;
}

body:not([data-theme="dark"]) footer a {
    color: #0f172a !important;
}

body:not([data-theme="dark"]) footer a:hover {
    color: #6366f1 !important;
}

body:not([data-theme="dark"]) .tab-btn {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #cbd5e1 !important;
}

body:not([data-theme="dark"]) .tab-btn:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
}

body:not([data-theme="dark"]) .tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

body:not([data-theme="dark"]) p,
body:not([data-theme="dark"]) span,
body:not([data-theme="dark"]) label {
    color: #1e293b !important;
}

body:not([data-theme="dark"]) input,
body:not([data-theme="dark"]) textarea {
    color: #0f172a !important;
    background: #ffffff !important;
}

body:not([data-theme="dark"]) button {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Mobile Responsive - Tool Pages */
@media (max-width: 768px) {
    .tool-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .button-row {
        flex-direction: column;
        gap: 0.8rem;
    }

    .button-row button {
        width: 100%;
        padding: 1rem 1.2rem;
    }

    .tool-input,
    .tool-output,
    .content-card {
        padding: 1.5rem;
    }

    .card-heading h2 {
        font-size: 1.3rem;
    }

    .content-card h2 {
        font-size: 1.2rem;
    }

    .related-tools {
        flex-direction: column;
    }

    .related-tools a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .navbar .container,
    footer .container {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        gap: 0.35rem;
    }

    .hero-stats,
    .content-grid,
    main .tool-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    main section {
        padding: 3.5rem 0;
    }

    .hero {
        padding: 4.5rem 0 3.5rem;
    }

    .hero-actions,
    .button-row,
    .search-container {
        grid-template-columns: 1fr;
        display: grid;
        width: 100%;
    }

    .search-container {
        padding: 0.7rem;
    }

    #search-btn,
    .btn,
    .btn-primary,
    .btn-secondary,
    .tool-btn {
        width: 100%;
    }

    .stat-card {
        text-align: left;
    }

    nav {
        width: 100%;
    }

    nav ul {
        width: 100%;
        justify-content: flex-start;
    }

    .tab-btn {
        width: 100%;
    }

    .tools-grid,
    .category-content,
    main .related-tools {
        grid-template-columns: 1fr;
    }
}