* {
    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: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.converter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.converter-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.converter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header i {
    font-size: 1.5rem;
    margin-right: 12px;
    color: #667eea;
    width: 30px;
    text-align: center;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.converter-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input[readonly] {
    background: #f8f9fa;
    color: #667eea;
    font-weight: 500;
}

.input-group select {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.swap-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    margin: 10px auto;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1rem;
}

.swap-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .converter-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .converter-card {
        padding: 20px;
    }
    
    .card-header h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .converter-card {
        padding: 15px;
    }
    
    .input-group input,
    .input-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.converter-card {
    animation: fadeInUp 0.6s ease forwards;
}

.converter-card:nth-child(1) { animation-delay: 0.1s; }
.converter-card:nth-child(2) { animation-delay: 0.2s; }
.converter-card:nth-child(3) { animation-delay: 0.3s; }
.converter-card:nth-child(4) { animation-delay: 0.4s; }
.converter-card:nth-child(5) { animation-delay: 0.5s; }
.converter-card:nth-child(6) { animation-delay: 0.6s; }
.converter-card:nth-child(7) { animation-delay: 0.7s; }
.converter-card:nth-child(8) { animation-delay: 0.8s; }
.converter-card:nth-child(9) { animation-delay: 0.9s; }
.converter-card:nth-child(10) { animation-delay: 1.0s; }
.converter-card:nth-child(11) { animation-delay: 1.1s; }
.converter-card:nth-child(12) { animation-delay: 1.2s; }
.converter-card:nth-child(13) { animation-delay: 1.3s; }

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success {
    animation: successPulse 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Semantic HTML improvements */
main {
    outline: none;
}

section {
    outline: none;
}

/* Focus styles for accessibility */
input:focus,
select:focus,
.swap-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Print styles */
@media print {
    .swap-btn,
    .footer {
        display: none;
    }
    
    .converter-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
        color: black;
    }
} 