/* style.css - Modern, bright, clean design for Currency Converter */

@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;500;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

header h1 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
}

.converter-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
    .converter-card {
        padding: 2.5rem;
    }
}

.converter-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

@media (min-width: 768px) {
    .converter-card h2 {
        font-size: 1.8rem;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .input-group {
        flex-direction: row;
        align-items: center;
    }
}

.input-group input, .input-group select, .input-group textarea {
    flex: 1;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s;
    background: var(--surface-color);
}

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

.swap-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.2rem;
    margin: 0 auto;
}

.swap-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.rate-info {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Info Sections for AdSense/SEO */
.info-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .info-sections {
        grid-template-columns: 1fr 1fr;
        margin-top: 3rem;
    }
}

.info-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.info-card p {
    color: var(--text-muted);
}

/* Legal Content */
.legal-content {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .legal-content {
        padding: 2.5rem;
    }
}

.legal-content h2 {
    margin-bottom: 1.5rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-info p {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Global Navigation */
.gnb {
    margin-top: 0.5rem;
    width: 100%;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
}
.nav-menu li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s, border-bottom 0.2s;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid transparent;
}
.nav-menu li a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}
@media (min-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .gnb {
        margin-top: 0;
        width: auto;
    }
    .nav-menu {
        justify-content: flex-end;
    }
}
