:root {
    --primary-color: #2196f3;
    --primary-dark: #1976d2;
    --primary-light: #e3f2fd;
    --text-primary: #1a237e;
    --text-secondary: #283593;
    --background: #f0f8ff;
    --white: #ffffff;
    --error: #d32f2f;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --sidebar-width: 250px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background-color: #ffffff;
    border-right: 1px solid #e9ecef;
    overflow-y: auto;
    padding: 32px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    padding: 0 32px;
    margin-bottom: 40px;
    transition: color 0.2s ease;
}

.sidebar-title:hover {
    color: #1557b0;
}

.sidebar-nav {
    flex: 1;
    padding: 0 16px;
}

.nav-section {
    margin-bottom: 35px;
    padding: 0 16px;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section h3 {
    color: #5f6368;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0 12px;
    margin-bottom: 12px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-links a {
    color: #3c4043;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 450;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.nav-links a:hover {
    background-color: #f8f9fa;
    color: #1a73e8;
    transform: translateX(4px);
}

.nav-links a.active {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
    transform: translateX(4px);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 300px;
    padding: 40px;
    max-width: calc(100% - 300px);
}

.container {
    background-color: var(--white);
    padding: clamp(20px, 5vw, 40px);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    transition: var(--transition);
}

h1 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 30px;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--primary-light);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

button {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

#result {
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--border-radius);
    background-color: var(--primary-light);
    font-size: 1.1rem;
    text-align: center;
    position: relative;
}

.result-box {
    background-color: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-box p {
    margin: 0;
    padding: 5px 0;
}

.result-box .formula {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.copy-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.copy-button.copied {
    background: #4CAF50;
}

.error {
    color: var(--error);
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.conversion-table {
    background-color: var(--white);
    padding: clamp(20px, 5vw, 40px);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.conversion-table h2 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--primary-light);
}

th {
    background-color: var(--primary-color);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:nth-child(even) {
    background-color: var(--primary-light);
}

tr:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }

    .sidebar-title {
        padding: 0 16px;
        margin-bottom: 24px;
    }

    .nav-section {
        margin-bottom: 24px;
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 20px;
    }

    .container, .conversion-table {
        padding: 20px;
    }

    th, td {
        padding: 10px;
        font-size: 14px;
    }

    .table-container {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    input, button {
        font-size: 16px;
    }

    th, td {
        padding: 8px;
        font-size: 13px;
    }
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.timezone-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.timezone-result {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.timezone-result p {
    margin: 5px 0;
    font-size: 16px;
}

.timezone-result p:nth-child(2) {
    color: #666;
    font-size: 14px;
}

.seo-content {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.seo-content h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.seo-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.seo-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.seo-content li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: #1a73e8;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-toggle:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.menu-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Update existing mobile styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        position: fixed;
        z-index: 999;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .site-header {
        margin-bottom: 2rem;
    }

    .site-header h1 {
        font-size: 2rem;
    }

    .converter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .converter-card {
        padding: 1rem;
    }

    .seo-content {
        padding: 1rem;
        margin-top: 2rem;
    }
}

/* Add overlay for mobile menu */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Thermometer Styles */
.thermometer-container {
    width: 300px;
    height: 60px;
    margin: 20px auto;
    position: relative;
    padding: 10px 0;
}

.thermometer {
    width: 300px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    position: absolute;
    left: 0;
    top: 20px;
    border: 2px solid #ccc;
}

.mercury {
    height: 16px;
    background: linear-gradient(to right, #0066ff, #ff0000);
    position: absolute;
    left: 2px;
    top: 2px;
    border-radius: 8px;
    transition: width 0.5s ease-in-out;
}

.temperature-scale {
    position: absolute;
    top: 45px;
    left: 0;
    width: 300px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.temperature-scale span {
    white-space: nowrap;
} 