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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #ef4444;
    --secondary-hover: #dc2626;
    --success-color: #10b981;
    --success-bg: #f0fdf4;
    --success-border: #86efac;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --focus-ring: rgba(79, 70, 229, 0.2);
    --radius: 20px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.8s ease-out;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.converter-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

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

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    transition: all 0.2s;
    background: #fdfdfd;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.result-group input {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: #065f46;
    font-weight: 600;
}

.arrow-divider {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.button-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f1f5f9;
}

.ads-wrapper {
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.info-section {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.info-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.info-section h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
}

.info-section p {
    margin-bottom: 1rem;
    color: #475569;
}

.info-section pre {
    background: #f1f5f9;
    padding: 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1rem 0;
}

.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: #f8fafc;
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

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

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

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }

    .converter-card,
    .info-section {
        padding: 1.5rem;
    }

    .button-actions {
        flex-direction: column;
    }
}

/* Flashcards Section */
.flashcards-section {
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

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

.flashcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.flashcard {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.flashcard:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 20px -5px rgba(79, 70, 229, 0.15);
    background: #fdfdfd;
}

.flashcard-icon {
    width: 40px;
    height: 40px;
    background: var(--success-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.flashcard:hover .flashcard-icon {
    background: var(--primary-color);
    color: white;
    transform: rotate(5deg);
}

.flashcard-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .flashcard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .flashcard {
        padding: 1rem 0.5rem;
    }
}