/* Global Styles */
:root {
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --accent-color: #ec4899;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --secondary-color: #c084fc;
    --background-color: #0f172a;
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    --white: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.lang-switcher select {
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    background: var(--white);
    color: var(--text-color);
    cursor: pointer;
}

/* Main Content */
.main-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Calculator Section */
.calculator-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.calc-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.calc-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.calc-content.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
}

input[type="number"] {
    padding: 0.75rem;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    background: var(--white);
    width: 120px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.calc-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-self: center;
    margin-top: 1rem;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 1rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    display: none;
}

.result-box.show {
    display: block;
    animation: slideUp 0.3s ease;
}

/* SEO Content Section */
.content-section {
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    margin-top: 4rem;
    box-shadow: var(--shadow-md);
}

.content-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-section h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.content-section p {
    margin-bottom: 1.2rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

.content-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-light);
}

.content-section li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--white);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Consent Banner */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 100%;
}

.consent-banner.show {
    transform: translateY(0);
}

.consent-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.consent-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.consent-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

/* Close button for consent */
.close-consent {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    position: absolute;
    top: 5px;
    right: 10px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .logo {
        flex: 1;
    }

    .burger-menu {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 1rem;
        gap: 1rem;
        border-top: 1px solid var(--glass-border);
        margin-top: 1rem;
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .input-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .calc-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .content-section ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

[dir="rtl"] .close-consent {
    left: 10px;
    right: auto;
}