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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
    margin-right: 1rem;
    color: #ffd700;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.main-content {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

.converter-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.category-selector {
    margin-bottom: 2rem;
}

.category-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.conversion-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: end;
    margin-bottom: 2rem;
}

.input-section, .output-section {
    display: grid;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

.select-field, .input-field {
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.select-field:focus, .input-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.result-field {
    background: #f8f9fa;
    font-weight: 600;
    color: #667eea;
}

.swap-button-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.swap-button:hover {
    transform: translateY(-2px) rotate(180deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.swap-button:active {
    transform: translateY(0) rotate(180deg);
}

.conversion-info {
    margin-bottom: 2rem;
}

.formula-display {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    color: #666;
    text-align: center;
    border-left: 4px solid #667eea;
}

.quick-convert {
    margin-top: 2rem;
}

.quick-convert h3 {
    margin-bottom: 1rem;
    color: #555;
    font-weight: 600;
}

.quick-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-result-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.quick-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-result-item .unit-name {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.quick-result-item .unit-value {
    font-size: 1.1rem;
    color: #333;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
}

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

.feature-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    opacity: 0.9;
    line-height: 1.6;
}

.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .conversion-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .swap-button-container {
        order: 3;
        margin-top: 1rem;
    }
    
    .swap-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    .features-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .converter-card {
        padding: 1rem;
    }
    
    .quick-results-grid {
        grid-template-columns: 1fr;
    }
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}