:root {
    --primary-color: #0f766e;
    --secondary-color: #0891b2;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1f2937;
    --light-bg: #f8fafc;
    --border-color: #e5e7eb;
}

/* Navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.28);
    color: white;
}

.nav-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* Breadcrumb */
.breadcrumb-nav {
    margin-bottom: 16px;
}

.breadcrumb {
    list-style: none;
    display: flex;
    gap: 6px;
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumb a:hover {
    opacity: 0.75;
    text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
    color: white;
    font-weight: 600;
}

/* Tool Switcher */
.tool-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 16px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.tool-switcher-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
    white-space: nowrap;
}

.tool-switch-btn {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-block;
}

.tool-switch-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.tool-switch-btn.active {
    background: white;
    color: #0f766e;
    font-weight: 700;
    border-color: white;
    pointer-events: none;
}

@media (max-width: 600px) {
    .tool-switcher {
        gap: 6px;
        padding: 8px 12px;
    }

    .tool-switch-btn {
        font-size: 0.78rem;
        padding: 5px 10px;
    }
}

/* Related Tools */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.related-tools-section h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-link {
    display: inline-block;
    padding: 8px 18px;
    background: #f0f4ff;
    color: #4a5568;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.88rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.related-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.faq-section h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.faq-item {
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.faq-item summary {
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 4px 0;
    font-size: 0.92rem;
}

.faq-item summary:hover {
    color: var(--primary-color);
}

.faq-item p {
    margin-top: 8px;
    color: #555;
    line-height: 1.6;
    font-size: 0.9rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    padding: 20px;
    color: #1f2937;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    animation: fadeInDown 0.5s ease;
}

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

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card-header {
    background: var(--dark-bg);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2 {
    font-size: 1.5rem;
}

/* Category selector */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 30px 0;
}

.category-tab {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    color: #374151;
    padding: 9px 18px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-tab:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.category-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.converter-body {
    padding: 30px;
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
}

@media (max-width: 700px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }
    .swap-btn-wrapper {
        justify-self: center;
    }
}

.unit-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.unit-field select,
.unit-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s;
}

.unit-field select:focus,
.unit-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.unit-field select {
    margin-bottom: 10px;
    cursor: pointer;
}

.unit-field input.output-value {
    background: var(--light-bg);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.15rem;
}

.unit-field input.has-error {
    border-color: var(--error-color);
    background: #fef2f2;
}

.swap-btn-wrapper {
    display: flex;
    justify-content: center;
    padding-bottom: 12px;
}

.swap-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35);
}

.swap-btn:hover {
    background: var(--primary-color);
    transform: rotate(180deg);
}

.result-line {
    margin-top: 22px;
    padding: 16px 20px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    color: #374151;
    text-align: center;
}

.result-line strong {
    color: var(--primary-color);
}

.options-panel {
    padding: 0 30px 25px;
}

.message {
    padding: 12px 15px;
    border-radius: 6px;
    margin: 15px 0;
    display: none;
    font-size: 0.9rem;
}

.message.show {
    display: block;
}

.error-message {
    background: #fef2f2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

.success-message {
    background: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature {
    text-align: center;
    padding: 30px 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature h4 {
    margin-bottom: 10px;
    color: #1f2937;
}

.feature p {
    color: #6b7280;
    font-size: 0.9rem;
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}
