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

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #F9FAFB;
    --text-main: #111827;
    --text-muted: #4B5563;
    --card-bg: #FFFFFF;
    --border-color: #E5E7EB;
    --header-bg: rgba(255, 255, 255, 0.9);
    --footer-bg: #1F2937;
    --footer-text: #F9FAFB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #6366F1;
    --primary-hover: #818CF8;
    --bg-color: #111827;
    --text-main: #F9FAFB;
    --text-muted: #D1D5DB;
    --card-bg: #1F2937;
    --border-color: #374151;
    --header-bg: rgba(31, 41, 55, 0.9);
    --footer-bg: #030712;
    --footer-text: #F9FAFB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

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

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

#theme-toggle:hover {
    background-color: var(--border-color);
}

/* Main Content Layout */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

/* Tool Section */
.converter-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.result-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: rgba(79, 70, 229, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    text-align: center;
    display: none;
}

.result-box.show {
    display: block;
    animation: fadeIn 0.5s;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Sections (SEO Content) */
.content-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.content-section h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    margin-top: 1.5rem;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.content-section ul, .content-section ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: var(--text-muted);
}

.content-section li {
    margin-bottom: 0.5rem;
}

/* Static Pages Styles */
.static-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 2rem 1rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    color: white;
}

.footer-col p {
    color: #9CA3AF;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #374151;
    color: #9CA3AF;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile fix */
    }
    
    .mobile-menu-btn {
        display: block;
    }
}
