@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #5850ec; /* Indigo blue */
    --secondary: #06B6D4;
    --background: #fdfdfd;
    --surface: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #f3f4f6;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    
    /* Premium UI Tokens */
    --primary-gradient: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --soft-shadow: 0 20px 50px rgba(0,0,0,0.04);
    --border-radius-xl: 30px;
    --border-radius-lg: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, .logo a {
    font-family: 'Poppins', sans-serif;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-4 { margin-top: 2rem; }

/* Header */
.main-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.top-nav li a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.top-nav li a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.search-container {
    position: relative;
    width: 300px;
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 99px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #a855f7;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

/* Main Content */
.content-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 3rem 1rem;
    margin-bottom: 0;
}

.hero-badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.gradient-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}
.gradient-text {
    /* Slight gradient touch on logo if desired */
    background: linear-gradient(90deg, #111827, #4F46E5, #b435df);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

/* Categories & Tool Grid */
.categories-wrapper {
    margin-bottom: 4rem;
    margin-top: 1rem;
}

.category-section {
    margin-bottom: 2.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem 2rem 2rem 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    list-style: none; /* remove default arrow */
    display: flex;
    align-items: center;
    padding: 1rem 0;
    margin: 0;
    transition: color 0.2s;
}

.category-title::-webkit-details-marker {
  display: none;
}

details[open] .category-title {
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Tool Cards with unique pastel gradients */
.tool-card {
    padding: 1.8rem 1.5rem;
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    border: none;
    background: #ffffff;
    border: 1px solid #f9fafb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

/* Applying pastel background colors exactly like image */
.category-section:nth-child(even) .tool-card:nth-child(4n+1) { background: linear-gradient(to bottom right, #fdf4f6, #fce7ec); } /* Pinkish */
.category-section:nth-child(even) .tool-card:nth-child(4n+2) { background: linear-gradient(to bottom right, #f0fdf4, #dcfce7); } /* Greenish/Teal */
.category-section:nth-child(even) .tool-card:nth-child(4n+3) { background: linear-gradient(to bottom right, #eff6ff, #dbeafe); } /* Blueish */
.category-section:nth-child(even) .tool-card:nth-child(4n+4) { background: linear-gradient(to bottom right, #fffbeb, #fef08a); } /* Yellowish */

.category-section:nth-child(odd) .tool-card:nth-child(4n+1) { background: linear-gradient(to bottom right, #eff6ff, #dbeafe); } /* Blueish */
.category-section:nth-child(odd) .tool-card:nth-child(4n+2) { background: linear-gradient(to bottom right, #fff7ed, #ffedd5); } /* Orangish */
.category-section:nth-child(odd) .tool-card:nth-child(4n+3) { background: linear-gradient(to bottom right, #fdf4f6, #fce7ec); } /* Pinkish */
.category-section:nth-child(odd) .tool-card:nth-child(4n+4) { background: linear-gradient(to bottom right, #f0fdf4, #dcfce7); } /* Greenish/Teal */

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.icon-margin {
    margin-right: 0.5rem;
    color: var(--primary);
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card-desc {
    color: #4b5563;
    font-size: 0.85em;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.use-btn {
    align-self: flex-start;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.use-btn:hover {
    color: #4338ca;
}

/* Page Pages Layout (About/Contact) */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.badge-tag {
    display: inline-block;
    background: #f3e8ff;
    color: #9333ea;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
}

.info-card h2, .info-card h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-card p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-grid, .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.about-feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    text-align: left;
}

.about-feature-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}
.about-feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.primary-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.primary-btn:hover { background: #4338ca; }

/* Features Section */
.features-section {
    background: var(--surface);
    padding: 3.5rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid #f9fafb;
    max-width: 1000px;
    margin: 0 auto;
}

.features-section h3 {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-icon-1 { color: #f59e0b; margin-bottom: 1rem; }
.feature-icon-2 { color: #f59e0b; margin-bottom: 1rem; }
.feature-icon-3 { color: #8b5cf6; margin-bottom: 1rem; }

.feature h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Tool Pages */
.tool-page-container {
    max-width: 1100px;
    margin: 1rem auto;
}

.tool-main-card {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.tool-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.tool-page-icon {
    font-size: 2.5rem;
    color: #f59e0b;
    margin-bottom: 1rem;
    background: #6366f115;
    padding: 1rem;
    border-radius: 12px;
}

.tool-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.tool-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.input-group {
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.tool-input {
    width: 100%;
    padding: 1rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f9fafb;
    font-family: inherit;
    font-weight: 500;
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
}

.calc-btn {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    padding: 1.1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.calc-btn:hover {
    opacity: 0.9;
}

.result-box {
    margin-top: 3.5rem;
    padding: 2.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    min-height: 120px;
    display: block;
    width: 100%;
    color: var(--text-muted);
    font-weight: 500;
}

.calculator-box > p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* SEO Paragraph Integration */
.seo-paragraph {
    margin-top: 4rem;
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.seo-paragraph h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.seo-paragraph p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

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

.footer-container p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* --- PREMIUM STYLING SYSTEM --- */
.premium-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.premium-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.premium-huge-card {
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.04);
    padding: 3.5rem 2.5rem;
    text-align: center;
    margin-bottom: 0;
    border: 1px solid rgba(88, 80, 236, 0.1);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.premium-gradient-text {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.premium-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
}

@media (max-width: 900px) {
    .premium-dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .premium-dashboard-grid { grid-template-columns: 1fr; }
}

.premium-mini-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.03);
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.premium-mini-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.mini-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.2rem;
}

.mini-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.mini-card-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -1px;
}

.mini-card-subtext {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.4rem;
}

/* Progress Bars */
.premium-progress-bg {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 99px;
    margin-top: 0.8rem;
    overflow: hidden;
}

.premium-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-btn-container {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 99px;
    background: #f1f5f9;
}

.back-link:hover {
    color: #a855f7;
    background: #f5f3ff;
    transform: translateX(-5px);
}

/* Article Styling */
.seo-article {
    margin-top: 6rem;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.seo-article p {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #475569;
    font-size: 1.1rem;
}

.seo-article h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

/* --- PREMIUM PRO-LEVEL DARK MODE FOR FINTOOLS --- */
.dark-mode, .dark-mode body {
    --background: #09090b; /* Deep zinc black */
    --surface: #18181b;    /* Zinc 900 */
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --card-bg: #18181b;
    background-color: var(--background) !important;
}

.dark-mode .main-header, 
.dark-mode .main-footer,
.dark-mode .features-section,
.dark-mode .info-card,
.dark-mode .seo-paragraph,
.dark-mode .premium-huge-card,
.dark-mode .premium-mini-card,
.dark-mode .category-section,
.dark-mode .tool-main-card {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text-main) !important;
}

.dark-mode .tool-card {
    border: 1px solid #27272a !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
    background: #18181b !important;
}

/* Beautiful PRO-LEVEL Dark Mode Gradients for Tool Cards */
.dark-mode .category-section:nth-child(even) .tool-card:nth-child(4n+1) { background: linear-gradient(145deg, #2a1120, #18181b) !important; }
.dark-mode .category-section:nth-child(even) .tool-card:nth-child(4n+2) { background: linear-gradient(145deg, #0d2822, #18181b) !important; }
.dark-mode .category-section:nth-child(even) .tool-card:nth-child(4n+3) { background: linear-gradient(145deg, #0e1e32, #18181b) !important; }
.dark-mode .category-section:nth-child(even) .tool-card:nth-child(4n+4) { background: linear-gradient(145deg, #2b2306, #18181b) !important; }

.dark-mode .category-section:nth-child(odd) .tool-card:nth-child(4n+1) { background: linear-gradient(145deg, #0e1e32, #18181b) !important; }
.dark-mode .category-section:nth-child(odd) .tool-card:nth-child(4n+2) { background: linear-gradient(145deg, #2b1406, #18181b) !important; }
.dark-mode .category-section:nth-child(odd) .tool-card:nth-child(4n+3) { background: linear-gradient(145deg, #2a1120, #18181b) !important; }
.dark-mode .category-section:nth-child(odd) .tool-card:nth-child(4n+4) { background: linear-gradient(145deg, #0d2822, #18181b) !important; }

.dark-mode .tool-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.05) !important;
    transform: translateY(-5px);
}

.dark-mode .tool-input,
.dark-mode .search-input,
.dark-mode #tool-search {
    background-color: #09090b !important;
    border-color: var(--border) !important;
    color: var(--text-main) !important;
}

/* Force override of inline white backgrounds generated natively */
.dark-mode [style*=\"background:white\"], 
.dark-mode [style*=\"background:#fff\"], 
.dark-mode [style*=\"background: #ffffff\"] {
    background-color: var(--surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

.dark-mode [style*=\"background:#f8fafc\"],
.dark-mode [style*=\"background: #f8fafc\"] {
    background-color: #09090b !important;
    border-color: var(--border) !important;
    color: var(--text-main) !important;
}

.dark-mode .result-box, 
.dark-mode .hero-badge, 
.dark-mode .badge-tag, 
.dark-mode .tool-page-icon {
    background-color: rgba(139, 92, 246, 0.15) !important; 
    border-color: rgba(139, 92, 246, 0.4) !important;
}

.dark-mode .seo-article h2,
.dark-mode .seo-article h3,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode .tool-title,
.dark-mode .page-title,
.dark-mode .premium-title,
.dark-mode .category-title {
    color: var(--text-main) !important;
}

.dark-mode .seo-article p,
.dark-mode .seo-article li,
.dark-mode .calculator-box p,
.dark-mode .premium-subtitle,
.dark-mode .card-desc,
.dark-mode .tool-subtitle {
    color: #e2e8f0 !important;
}

.dark-mode .premium-mini-card {
    background: #18181b !important;
    border-color: #27272a !important;
}

.dark-mode .mini-card-value { color: #f4f4f5 !important; }
.dark-mode .mini-card-label { color: #a1a1aa !important; }

/* About Page Dark Mode Fixes */
.dark-mode .info-card p,
.dark-mode .info-card h2,
.dark-mode .info-card h3,
.dark-mode .info-card h4,
.dark-mode .premium-mini-card p,
.dark-mode .premium-mini-card h4 {
    color: var(--text-main) !important;
}

.dark-mode .info-card p,
.dark-mode .premium-mini-card p {
    color: #e2e8f0 !important;
}

/* Dark mode toggle animation */
#theme-toggle {
    transition: transform 0.3s ease, background 0.3s ease;
}
#theme-toggle:hover {
    transform: scale(1.05);
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}
