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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.logo-icon {
    background: white;
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text .tagline {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.3);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 0.5rem 0;
}

nav a:hover {
    opacity: 0.8;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Currency Converter */
.converter-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 10px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.converter-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.converter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.convert-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.3);
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.content-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Content Card */
.content-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
}

.content-card h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

.content-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-card p:last-child {
    margin-bottom: 0;
}

/* Currency Strength Meter */
.strength-meter-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
}

.strength-meter-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    text-align: center;
}

.strength-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.strength-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.strength-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 50px;
}

.strength-bar-container {
    flex: 1;
    height: 24px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    transition: width 0.5s ease, background 0.5s ease;
    border-radius: 6px;
}

/* Dynamic colors set via inline style, but fallback classes available */
.strength-bar.strength-red {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.strength-bar.strength-yellow {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.strength-bar.strength-green {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.strength-updated {
    text-align: right;
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.strength-updated span {
    color: var(--text-dark);
}

/* Currency News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.news-card {
    position: relative;
    background: white;
    border: 1px solid #e5e7eb;
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    border-left-width: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.currency-flags {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.flag-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.news-card-content {
    flex: 1;
    min-width: 0;
}

.news-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.125rem 0;
    letter-spacing: -0.25px;
    line-height: 1.2;
}

.news-card-title {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
}

.news-arrow {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.news-card:hover .news-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-container p {
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    nav a {
        display: block;
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero {
        padding: 2rem 1.5rem;
    }

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

    .logo-text .brand {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .strength-grid {
        grid-template-columns: 1fr;
    }

    .strength-meter-card,
    .content-card {
        padding: 1.5rem;
    }

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

    .news-card {
        padding: 0.75rem 0.875rem;
    }

    .news-card h3 {
        font-size: 1rem;
    }
    
    .news-card-title {
        font-size: 0.75rem;
    }
    
    .flag-img {
        width: 20px;
        height: 15px;
    }
}
