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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f8fafd 0%, #e3f2fd 50%, #f8fafd 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 2rem;
    gap: 2rem;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.5);
}

.nav-tab.active {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 100px);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
}

.welcome-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(25, 118, 210, 0.2);
}

.welcome-section p {
    font-size: 1.2rem;
    color: #546e7a;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(25, 118, 210, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(25, 118, 210, 0.2);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-title {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: #546e7a;
    font-size: 0.9rem;
}

/* Converter Sections */
.converter-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.converter-section.active {
    display: block;
}

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

.converter-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.converter-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.conversion-container {
    display: flex;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.input-group {
    flex: 1;
}

.input-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-field {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-field:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.select-field {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-field:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.swap-button {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
    margin-bottom: 1.5rem;
}

.swap-button:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.units-container {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.status-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-success {
    color: #27ae60;
}

.status-warning {
    color: #f39c12;
}

.status-error {
    color: #e74c3c;
}

.refresh-btn {
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background 0.3s ease;
}

.refresh-btn:hover {
    background: #1565c0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .nav-tabs {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 0.25rem;
    }

    .nav-tab {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .welcome-section h1 {
        font-size: 2.5rem;
    }

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

    .conversion-container {
        flex-direction: column;
        gap: 1rem;
    }

    .units-container {
        flex-direction: column;
    }

    .swap-button {
        align-self: center;
        margin: 0.5rem 0;
        transform: rotate(90deg);
    }

    .swap-button:hover {
        transform: rotate(270deg) scale(1.1);
    }

    .converter-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome-section {
        padding: 2rem 1rem;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

    .nav-tabs {
        padding: 0.25rem;
    }

    .nav-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(25, 118, 210, 0.1);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-text {
    color: #546e7a;
    font-size: 0.9rem;
}

.footer-brand {
    color: #1976d2;
    font-weight: 600;
}