:root {
    --primary: #6366f1;
    --primary-glow: #6366f1aa;
    --accent: #ec4899;
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --surface: rgba(30, 41, 59, 0.7);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(0, 0, 0, 0.2);
    --radius: 16px;
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-gradient);
    color: var(--text);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Blobs for specific "wow" factor */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-blobs::before,
.background-blobs::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.background-blobs::before {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: float 20s infinite alternate;
}

.background-blobs::after {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation: float 15s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.glass-header {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.glass-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.highlight {
    color: var(--primary);
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, transform 0.2s;
}

nav a:hover {
    color: white;
    transform: translateY(-2px);
}

/* Hero */
.hero-section {
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, white, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Calculator Card */
.calculator-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calc-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-toggle {
    background: var(--input-bg);
    padding: 4px;
    border-radius: 8px;
    display: flex;
}

.mode-toggle button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.mode-toggle button.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 10px var(--primary-glow);
}

/* Calculator Grid */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .equals {
        transform: rotate(90deg);
        justify-self: center;
    }
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.input-wrapper {
    display: flex;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

input[type="number"] {
    background: transparent;
    border: none;
    color: white;
    padding: 1rem;
    width: 100%;
    font-size: 1.1rem;
    outline: none;
    font-family: var(--font-main);
}

select {
    background: transparent;
    border: none;
    color: var(--accent);
    padding: 0 1rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    border-left: 1px solid var(--glass-border);
    font-family: var(--font-main);
}

select option {
    background: var(--bg-dark);
    color: white;
}

.equals {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Advanced Options */
.toggle-advanced {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    padding: 0;
}

.toggle-advanced:hover {
    color: var(--primary);
}

.advanced-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.advanced-panel.hidden {
    display: none;
}

.option-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.option-item {
    display: flex;
    flex-direction: column;
}

.option-item input {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem;
    color: white;
    margin-top: 5px;
}

.help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Preview Section */
.preview-section {
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.preview-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.preview-box-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    color: #1e1b4b;
    overflow: hidden;
}

.preview-box {
    width: 100px;
    height: 100px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s;
}

#preview-text {
    font-size: 16px;
    line-height: 1.5;
}

/* Tools Grid */
.section-padding {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: white;
    transition: transform 0.3s, background 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    background: var(--glass);
    border-color: var(--primary);
}

.icon-box {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    margin-inline: auto;
    color: var(--accent);
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Articles */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--glass-border);
}

.article-card h3 a {
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    display: block;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.article-card h3 a:hover {
    color: var(--primary);
}

.article-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.9);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer .container {
        grid-template-columns: 1fr;
    }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    margin-bottom: 1rem;
    display: block;
}

.footer-col.links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* AdSense */
.ad-unit-sm {
    margin-top: 1.5rem;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.8rem;
}