/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #475569;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--primary-color);
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

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

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ===== Container ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-lg);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-links a.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.nav-links svg {
    width: 20px;
    height: 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== Mobile Navigation ===== */
@media (max-width: 968px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        height: 100vh;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        transform: translateX(100%);
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.25rem;
        padding: 1rem 2rem;
    }

    .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(7px, -7px);
    }
}

/* ===== Hero Banner ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 4rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(217, 70, 239, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-container {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 6rem;
    }
}

.hero-content {
    text-align: center;
}

@media (min-width: 1024px) {
    .hero-content {
        text-align: left;
    }
}

.hero-badge-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

@media (min-width: 1024px) {
    .hero-badge-wrapper {
        justify-content: flex-start;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-light);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.hero-badge-count {
    padding: 0.5rem 1.25rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.gradient-text-alt {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(10deg); }
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

@media (min-width: 1024px) {
    .hero-stats {
        justify-content: flex-start;
    }
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: center;
    }
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
}

.hero-image-bg {
    width: 100%;
    height: 100%;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

.hero-image-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.hero-image-bg:hover img {
    opacity: 0.6;
}

.floating-card {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.floating-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-text {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.card-1 {
    top: 10%;
    left: -5%;
    animation: float 6s ease-in-out infinite;
}

.card-2 {
    top: 5%;
    right: -5%;
    animation: float 7s ease-in-out infinite 1s;
}

.card-3 {
    bottom: 20%;
    left: -8%;
    animation: float 8s ease-in-out infinite 2s;
}

.card-4 {
    bottom: 10%;
    right: -8%;
    animation: float 5s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@media (max-width: 768px) {
    .floating-card {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    .card-icon {
        width: 40px;
        height: 40px;
    }
    .card-text {
        font-size: 0.875rem;
    }
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    opacity: 0.7;
    animation: bounce 2s ease-in-out infinite;
}

.hero-scroll-indicator svg {
    animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.hero-image {
    margin-top: 3rem;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-image img {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-xl);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-arrow {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn svg {
    width: 20px;
    height: 20px;
}

/* ===== Sections ===== */
.section {
    padding: 5rem 1.5rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

/* ===== Tool Cards ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tool-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.tool-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.tool-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 2rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
    font-weight: 500;
}

.tool-link:hover {
    gap: 0.75rem;
}

/* ===== Features Grid ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--primary-light);
}

/* ===== Tool Page Specific ===== */
.tool-page {
    padding-top: 6rem;
}

.tool-hero {
    background: var(--bg-secondary);
    padding: 3rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tool-hero h1 {
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.tool-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    padding: 2rem 0;
}

@media (max-width: 1024px) {
    .tool-content {
        grid-template-columns: 1fr;
    }
}

.tool-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== Card Component ===== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin-bottom: 0;
    font-size: 1.125rem;
}

.card-header svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-light);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* ===== Output Display ===== */
.output-display {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 200px;
    overflow: auto;
}

.output-display pre {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ===== Tree Visualization ===== */
.tree-view {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
}

.tree-node {
    padding-left: 1.5rem;
    position: relative;
}

.tree-node::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
}

.tree-key {
    color: var(--primary-light);
}

.tree-string {
    color: var(--success-color);
}

.tree-number {
    color: var(--accent-color);
}

.tree-boolean {
    color: var(--secondary-color);
}

.tree-null {
    color: var(--text-muted);
}

.tree-bracket {
    color: var(--text-secondary);
}

/* ===== Table Styles ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* ===== Stats Display ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Explanation Sections ===== */
.explanation-section {
    margin-bottom: 2rem;
}

.explanation-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.explanation-section h4 svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-light);
}

.info-box {
    padding: 1rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 1rem 0;
}

.warning-box {
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 1rem 0;
}

.warning-box p {
    color: var(--warning-color);
}

/* ===== Code Block ===== */
.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 1rem 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.code-header span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.code-content {
    padding: 1rem;
    overflow-x: auto;
}

.code-content pre {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===== Tabs ===== */
.tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 1.5rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto 3rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer-links h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
}

.social-link:hover svg {
    fill: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Page Header (for non-tool pages) ===== */
.page-header {
    padding: 8rem 1.5rem 3rem;
    background: var(--bg-secondary);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-content {
    padding: 3rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.page-content h2 {
    margin-top: 2rem;
}

.page-content ul,
.page-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* ===== Contact Form ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-light);
}

/* ===== Comparison Table ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    padding: 1rem;
    background: var(--bg-tertiary);
    font-weight: 600;
    text-align: center;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.comparison-table tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* ===== Loading & Animation ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }
.visible { display: block; }

/* ===== Use Cases Section ===== */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.use-case-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.use-case-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.use-case-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.use-case-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.use-case-tools {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tool-badge {
    padding: 0.375rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 500;
}

/* ===== Educational Section ===== */
.educational-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .educational-content {
        grid-template-columns: 1.5fr 1fr;
    }
}

.educational-text .lead-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.educational-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edu-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.edu-feature svg {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.edu-feature h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.edu-feature p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.learning-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-big {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ===== FAQ Section ===== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 2rem 1.5rem 2rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* ===== Trust Section ===== */
.trust-section {
    text-align: center;
}

.trust-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* ===== Mobile Responsive Styles ===== */

/* Extra Small Devices (phones, 480px and below) */
@media (max-width: 480px) {
    /* Base Typography */
    html {
        font-size: 14px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Section Spacing */
    .section {
        padding: 3rem 1rem;
    }

    /* Navigation */
    .nav {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .logo-icon svg {
        width: 18px;
        height: 18px;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Hero Section */
    .hero {
        padding: 6rem 1rem 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .hero-badge-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .hero-badge,
    .hero-badge-count {
        font-size: 0.75rem;
        padding: 0.375rem 1rem;
    }

    /* Floating Cards - Hide on very small screens */
    .floating-card {
        display: none;
    }

    /* Tool Cards Grid */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tool-card {
        padding: 1.25rem;
    }

    .tool-icon {
        width: 48px;
        height: 48px;
    }

    .tool-icon svg {
        width: 24px;
        height: 24px;
    }

    /* Cards */
    .card {
        padding: 1rem;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    /* Forms */
    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-textarea {
        min-height: 120px;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-item {
        padding: 0.75rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }
}


/* Small Devices (phones landscape, small tablets, 481px - 768px) */
@media (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    /* Section */
    .section {
        padding: 3.5rem 1.25rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    /* Hero */
    .hero {
        padding: 7rem 1.25rem 3rem;
    }

    .hero-container {
        gap: 2.5rem;
    }

    .hero-visual {
        margin-top: 1rem;
    }

    .hero-visual .floating-card {
        display: none;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Tool Page */
    .tool-page {
        padding-top: 5rem;
    }

    .tool-hero {
        padding: 2rem 1.25rem;
    }

    .tool-hero h1 {
        font-size: 1.75rem;
    }

    .tool-hero p {
        font-size: 1rem;
    }

    .tool-content {
        padding: 1.5rem 0;
        gap: 1.5rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* Use Cases */
    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .use-case-card {
        padding: 1.5rem;
    }

    .use-case-icon {
        width: 56px;
        height: 56px;
    }

    /* Educational Content */
    .educational-content {
        gap: 2rem;
    }

    .learning-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-big {
        font-size: 2rem;
    }

    /* FAQ */
    .faq-question {
        padding: 1.25rem 1.5rem;
    }

    .faq-question h3 {
        font-size: 1rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1.5rem 1.5rem;
    }

    /* Tables */
    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.75rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Code Block */
    .code-content {
        padding: 0.75rem;
    }

    .code-content pre {
        font-size: 0.8rem;
    }

    /* Output Display */
    .output-display {
        padding: 0.75rem;
        min-height: 150px;
    }

    .output-display pre {
        font-size: 0.8rem;
    }

    /* Tree View */
    .tree-view {
        font-size: 0.8rem;
    }

    .tree-node {
        padding-left: 1rem;
    }

    /* Tabs */
    .tab-list {
        gap: 0.25rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* Trust Badges */
    .trust-badges {
        gap: 1rem;
    }

    .trust-badge {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }
}


/* Medium Devices (tablets, 769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-container {
        gap: 3rem;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-content {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        min-height: 44px;
        padding: 0.875rem 1.25rem;
    }

    .tab-btn {
        min-height: 44px;
    }

    .tool-link {
        padding: 0.5rem 0;
        display: inline-block;
    }

    /* Remove hover effects that don't work well on touch */
    .tool-card:hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }

    .btn-secondary:hover {
        transform: none;
    }

    /* Add active states instead */
    .tool-card:active {
        transform: scale(0.98);
        border-color: var(--primary-color);
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* Landscape Phone Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 1.5rem 2rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-links {
        padding-top: 4rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-toggle,
    .hero-visual,
    .floating-card,
    .btn,
    .tool-sidebar {
        display: none !important;
    }

    .tool-content {
        grid-template-columns: 1fr;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-card {
        animation: none;
    }

    .hero-scroll-indicator {
        animation: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #888;
    }

    .btn-primary {
        border: 2px solid white;
    }

    .card {
        border-width: 2px;
    }

    .form-input:focus,
    .form-textarea:focus,
    .form-select:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
}



/* ===== Cookie Consent Banner ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cookie-text svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.cookie-text p {
    margin: 0;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .cookie-consent {
        padding: 1rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-text {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Color Format Tool Styles ===== */
.color-preview-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .color-preview-grid {
        grid-template-columns: 1fr;
    }
}

.color-picker-wrap {
    position: relative;
}

.color-box {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    border: 3px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.color-box:hover {
    border-color: var(--primary-color);
}

.color-picker-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.format-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.format-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.format-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.format-label span:last-child {
    color: var(--text-secondary);
}

.format-field {
    padding: 0.75rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.format-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.hex {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge.rgb {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.badge.hsl {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}


/* Slider Styles */
.slider-group {
    margin-bottom: 1.25rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.slider-label span:first-child {
    font-weight: 500;
}

.slider-label span:last-child {
    font-family: 'Fira Code', monospace;
    color: var(--text-secondary);
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider.red::-webkit-slider-thumb {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.slider.green::-webkit-slider-thumb {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.slider.blue::-webkit-slider-thumb {
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Channel Breakdown Styles */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .channels-grid {
        grid-template-columns: 1fr;
    }
}

.channel-card {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    overflow: hidden;
    text-align: center;
}

.channel-card.red {
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.channel-card.green {
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.channel-card.blue {
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.channel-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    transition: width 0.3s ease;
}

.channel-card.red .channel-bar {
    background: #ef4444;
}

.channel-card.green .channel-bar {
    background: #22c55e;
}

.channel-card.blue .channel-bar {
    background: #3b82f6;
}

.channel-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    margin-bottom: 0.25rem;
}

.channel-card.red .channel-value {
    color: #ef4444;
}

.channel-card.green .channel-value {
    color: #22c55e;
}

.channel-card.blue .channel-value {
    color: #3b82f6;
}

.channel-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.channel-percent {
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace;
    color: var(--text-muted);
}


/* Preset Colors Grid */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .presets-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.preset-btn {
    aspect-ratio: 1;
    border: 3px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.preset-btn:hover {
    transform: scale(1.1);
    border-color: var(--text-primary);
}

.preset-btn::after {
    content: attr(data-name);
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.preset-btn:hover::after {
    opacity: 1;
}

/* Format Cards for Color Explanation */
.format-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .format-cards {
        grid-template-columns: 1fr;
    }
}

.format-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border-left: 4px solid;
}

.format-card.hex {
    border-color: #ef4444;
}

.format-card.rgb {
    border-color: #22c55e;
}

.format-card.hsl {
    border-color: #3b82f6;
}

.format-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.format-card p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.format-card p:last-child {
    margin-bottom: 0;
}

.format-card code {
    font-family: 'Fira Code', monospace;
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}


/* ===== Precision & Rounding Tool Styles ===== */
.rounding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.rounding-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.rounding-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.rounding-method {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.rounding-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.rounding-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .rounding-grid {
        grid-template-columns: 1fr;
    }

    .rounding-value {
        font-size: 1.5rem;
    }
}


/* ===== Mobile Responsive Fixes for Tool Pages ===== */
@media (max-width: 768px) {
    /* Force single column for inline grid styles */
    .tool-main div[style*="grid-template-columns: 1fr 1fr"],
    .tool-main div[style*="grid-template-columns:1fr 1fr"] {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .tool-main div[style*="grid-template-columns: 1fr 1fr"] > div,
    .tool-main div[style*="grid-template-columns:1fr 1fr"] > div {
        margin-bottom: 1.5rem !important;
    }

    .tool-main div[style*="grid-template-columns: 1fr 1fr"] > div:last-child,
    .tool-main div[style*="grid-template-columns:1fr 1fr"] > div:last-child {
        margin-bottom: 0 !important;
    }

    /* Comparison tables responsive */
    .comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table th,
    .comparison-table td {
        white-space: nowrap;
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    /* Code blocks in tool pages */
    .code-block {
        font-size: 0.8rem;
        overflow-x: auto;
    }

    .code-block pre {
        white-space: pre;
        overflow-x: auto;
    }

    /* Info and warning boxes */
    .info-box,
    .warning-box {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Form elements - prevent iOS zoom */
    .form-input,
    .form-select,
    input[type="text"],
    input[type="number"],
    select {
        min-height: 44px;
        font-size: 16px !important;
    }

    /* Flex layouts with gap - ensure wrap */
    .tool-main div[style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    /* Precision grid */
    .precision-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens - comparison tables */
    .comparison-table th,
    .comparison-table td {
        padding: 0.35rem 0.25rem;
        font-size: 0.7rem;
    }

    /* Buttons full width on mobile */
    .tool-main .btn {
        width: 100%;
        justify-content: center;
    }

    .tool-main .btn + .btn {
        margin-top: 0.5rem;
    }

    /* Button groups */
    .tool-main div[style*="display: flex"][style*="gap"] .btn {
        flex: 1 1 auto;
        min-width: 60px;
    }

    /* Card padding reduction */
    .tool-main .card {
        padding: 1rem;
    }

    /* Nested cards */
    .tool-main .card .card {
        padding: 0.875rem;
    }

    /* Code blocks smaller */
    .code-block {
        font-size: 0.75rem;
    }

    .code-block pre {
        padding: 0.75rem;
    }

    /* Info/warning boxes */
    .info-box,
    .warning-box {
        padding: 0.875rem;
        font-size: 0.85rem;
    }

    .info-box h4,
    .warning-box h4 {
        font-size: 0.9rem;
    }
}


/* ===== URL Structure Tool Styles ===== */
.url-visual {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.url-visual-parts {
    display: flex;
    flex-wrap: wrap;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    line-height: 1.8;
}

.url-part {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin: 0.125rem;
}

.url-part.protocol {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.url-part.domain {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.url-part.port {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.url-part.path {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.url-part.query {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.url-part.fragment {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.url-part.separator {
    background: transparent;
    color: var(--text-muted);
}

.url-components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.url-component-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1rem;
    border-left: 3px solid var(--border-color);
}

.url-component-card.protocol { border-left-color: #ef4444; }
.url-component-card.domain { border-left-color: #22c55e; }
.url-component-card.port { border-left-color: #f97316; }
.url-component-card.path { border-left-color: #3b82f6; }
.url-component-card.query { border-left-color: #a855f7; }
.url-component-card.fragment { border-left-color: #ec4899; }

.url-component-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.url-component-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-all;
}

.url-component-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.url-query-params {
    margin-top: 1.5rem;
}

.url-query-params h4 {
    margin-bottom: 1rem;
}

.url-query-params table {
    width: 100%;
    border-collapse: collapse;
}

.url-query-params th,
.url-query-params td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.url-query-params th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.85rem;
}

.url-query-params td {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.url-explanation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.url-explanation-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.url-explanation-item h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.url-explanation-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.url-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.url-dot.protocol { background: #ef4444; }
.url-dot.domain { background: #22c55e; }
.url-dot.port { background: #f97316; }
.url-dot.path { background: #3b82f6; }
.url-dot.query { background: #a855f7; }
.url-dot.fragment { background: #ec4899; }

.url-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.url-examples .btn {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .url-visual-parts {
        font-size: 0.85rem;
    }

    .url-components-grid {
        grid-template-columns: 1fr;
    }

    .url-explanation-grid {
        grid-template-columns: 1fr;
    }

    .url-examples {
        flex-direction: column;
    }

    .url-examples .btn {
        width: 100%;
        text-align: left;
        white-space: normal;
    }
}