/**
 * Tool Converter Theme Styling
 * Enhanced UI components, distinct section backgrounds, tool card effects, and AdSense blocks.
 */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark-bg: #0b0f19;
    --dark-card: #151d30;
    --dark-border: #232f48;
}

/* -------------------------------------------------------------
   Distinct Section Backgrounds
   ------------------------------------------------------------- */

/* Header / Navbar */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

/* 1. Hero Section - Deep Royal Indigo Gradient */
.section-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}
.section-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0) 70%);
    filter: blur(50px);
    pointer-events: none;
}
.section-hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: 15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0) 70%);
    filter: blur(50px);
    pointer-events: none;
}

/* 2. Category Quick-Bar - Floating Modern Soft Border */
.section-quick-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

/* 3. Featured Tools Showcase - Soft Cool Slate */
.section-featured {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

/* 4. Categorized Tool Grid - Crisp Clean Modern Canvas */
.section-tool-grid {
    background: #ffffff;
}

/* 5. Why Choose Us Section - Rich Slate Contrast with Subtle Grid */
.section-features {
    background: #0f172a;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
    position: relative;
}

/* 6. SEO Content Hub Section - Warm Subtle Grey */
.section-seo-guide {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* 7. FAQ Section - Light Elegant Texture */
.section-faq {
    background: #ffffff;
}

/* 8. Footer - Midnight Rich Slate */
.site-footer {
    background: #070a13;
    border-top: 1px solid #1e293b;
}

/* -------------------------------------------------------------
   Tool Card Aesthetics & Animations
   ------------------------------------------------------------- */
.tool-card {
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    border-color: #cbd5e1;
}

.tool-card .card-top-accent {
    height: 4px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: height 0.2s ease;
}

.tool-card:hover .card-top-accent {
    height: 6px;
}

/* Tool Badges */
.badge-popular {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.badge-fast {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.badge-free {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.badge-new {
    background: #ffe4e6;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

/* Category Accent Glows */
.cat-text {
    --cat-color: #6366f1;
    --cat-bg: #eef2ff;
}
.cat-web {
    --cat-color: #10b981;
    --cat-bg: #ecfdf5;
}
.cat-image {
    --cat-color: #f59e0b;
    --cat-bg: #fffbeb;
}
.cat-finance {
    --cat-color: #f43f5e;
    --cat-bg: #fff1f2;
}
.cat-converter {
    --cat-color: #0284c7;
    --cat-bg: #f0f9ff;
}

/* -------------------------------------------------------------
   Interactive Tool Canvas UI
   ------------------------------------------------------------- */
.tool-sandbox-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    position: relative;
}

.tool-input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.tool-input-field,
.tool-textarea-field,
.tool-select-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.75rem;
    background-color: #f8fafc;
    color: #0f172a;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tool-textarea-field {
    min-height: 160px;
    resize: vertical;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
}

.tool-input-field:focus,
.tool-textarea-field:focus,
.tool-select-field:focus {
    outline: none;
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.tool-result-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    min-height: 120px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #0f172a;
    word-break: break-all;
    white-space: pre-wrap;
    position: relative;
}

.btn-tool-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-copy {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Stat Cards for Counters */
.stat-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.stat-pill-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.stat-pill-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Drag and Drop Zone */
.tool-dropzone {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-dropzone:hover,
.tool-dropzone.dragover {
    border-color: #4f46e5;
    background: #eef2ff;
}

/* -------------------------------------------------------------
   AdSense Placement Containers (Compliant Margins & Labels)
   ------------------------------------------------------------- */
.adsense-slot-wrapper {
    margin: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.adsense-slot-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.adsense-placeholder {
    min-height: 100px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    color: #64748b;
    font-size: 0.85rem;
}

/* -------------------------------------------------------------
   SEO Article Typography & Layout
   ------------------------------------------------------------- */
.seo-article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #334155;
}

.seo-article-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.seo-article-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.seo-article-content p {
    margin-bottom: 1.25rem;
}

.seo-article-content ul, 
.seo-article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-article-content li {
    margin-bottom: 0.5rem;
}

.seo-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.seo-article-content th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 0.875rem 1rem;
    border: 1px solid #1e293b;
}

.seo-article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.seo-article-content tr:nth-child(even) td {
    background: #f8fafc;
}

.seo-highlight-box {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
}

.seo-pro-tip {
    background: #eef2ff;
    border-left: 4px solid #4f46e5;
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
}

/* Toast Notifications */
#tool-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #0f172a;
    color: #ffffff;
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}
#tool-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Cookie Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    color: #f8fafc;
    padding: 1.25rem;
    border-top: 1px solid #334155;
    z-index: 9998;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
}
