:root {
    /* Light Theme Default */
    --primary: #6A98CC;
    /* Soft Trust Blue */
    --secondary: #7BB3A3;
    /* Calming Sage Green */
    --accent: #DCA996;
    /* Nurturing Warm Terracotta */
    --bg-main: #FDFBF9;
    /* Soft Ivory/Cream */
    --panel-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-main: #2C3E50;
    /* Deep Navy/Charcoal */
    --text-muted: #7F8C8D;
    /* Medium Gray */
    --font-main: 'Outfit', sans-serif;
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-bg-focus: #FFFFFF;
    --btn-text: #FFFFFF;
    --grad-opacity: 0.15;
    --result-bg: rgba(106, 152, 204, 0.08); /* Soft blue tinted background for contrast */
}

[data-theme="dark"] {
    /* Dark Theme Opt-in */
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #f093fb;
    --bg-main: #0a0a0c;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-bg-focus: rgba(0, 0, 0, 0.4);
    --btn-text: #000;
    --grad-opacity: 0.05;
    --result-bg: rgba(0, 0, 0, 0.4);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(79, 172, 254, var(--grad-opacity)) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(240, 147, 251, var(--grad-opacity)) 0%, transparent 40%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header & Nav */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    transition: 0.3s;
    font-size: 0.9rem;
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

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

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

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

.card {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 172, 254, 0.3);
}

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

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input,
select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--input-bg-focus);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: var(--btn-text);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    filter: brightness(1.1);
    transform: scale(0.98);
}

/* Results Display */
.result-box {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 16px;
    background: var(--result-bg);
    text-align: center;
    display: none;
    border: 1px dashed var(--glass-border);
}

.result-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.result-desc {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Article Section */
.articles-preview {
    margin-top: 6rem;
}

.article-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.article-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.article-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

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

footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 6rem;
    padding: 4rem 0;
    text-align: center;
}

.footer-links {
    margin-top: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.8rem;
}

/* Ad Placement Placeholders */
.ad-slot {
    width: 100%;
    min-height: 250px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    color: #333;
    font-size: 0.7rem;
    text-transform: uppercase;
}
.cta-box { background: var(--panel-bg); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--glass-border); text-align: center; }
.cta-box h3 { margin-bottom: 1rem; color: var(--primary); }
.cta-box h2 { color: var(--primary); }
.cta-box p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem;}
.cta-button { display: inline-block; padding: 0.8rem 1.5rem; background: var(--primary); color: white; text-decoration: none; border-radius: 8px; font-weight: 600; width: 100%; transition: opacity 0.2s;}
.cta-button.accent { background: var(--accent); }
.cta-button:hover { opacity: 0.9; }
