/* =========================================
   Global Variables & Reset
========================================= */
:root {
    --primary-color: #4361EE; 
    --secondary-color: #F72585; 
    --bg-color: #F4F7FE; 
    --card-bg: #FFFFFF;
    --text-main: #2B2D42;
    --text-muted: #8D99AE;
    --border-radius: 20px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    --bg-color: #0F172A; 
    --card-bg: #1E293B; 
    --text-main: #F8FAFC; 
    --text-muted: #94A3B8; 
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   Navbar (Header)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--card-bg);
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}

.logo {
    font-size: 20px;
    font-weight: 800;
}

.highlight {
    color: var(--primary-color);
}

.theme-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.2) rotate(15deg);
}

/* =========================================
   Calculator Layout (Main Tool)
========================================= */
.tool-container {
    display: flex;
    justify-content: center;
    padding: 60px 5%;
}

.calculator-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: background-color 0.3s ease;
}

.card-header {
    margin-bottom: 10px;
}

.tool-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.input-group input {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-main);
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
}

/* Chunky Action Button */
.action-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    margin-top: 10px;
    transition: transform 0.2s, background 0.3s;
}

.action-btn:hover {
    background-color: #324edb;
    transform: translateY(-3px);
}

.action-btn:active {
    transform: translateY(0);
}

/* =========================================
   Result Box
========================================= */
.result-box {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 15px;
    border: 2px dashed var(--primary-color);
    transition: all 0.3s ease;
}

.hidden {
    display: none;
}

.main-result {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 15px 0;
    color: var(--secondary-color);
}

.main-result span {
    font-size: 1.8rem;
}

.extra-stats {
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(141, 153, 174, 0.2);
    padding-top: 15px;
    margin-top: 15px;
}

.extra-stats strong {
    color: var(--text-main);
}

/* =========================================
   SEO Content & FAQ (AdSense Layout)
========================================= */
.content-section {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.content-section p, .content-section ol {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.content-section ol {
    padding-left: 20px;
}

.content-section ol li {
    margin-bottom: 10px;
}

.content-section ol li strong {
    color: var(--text-main);
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(141, 153, 174, 0.2);
    padding-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 5%;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .calculator-card {
        padding: 25px;
    }
    .main-result span {
        font-size: 1.5rem;
    }
}