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

:root {
    --primary-color: #f97316;
    /* Orange-Red primary */
    --primary-hover: #ea580c;
    --secondary-color: #ef4444;
    /* Red secondary */
    --bg-color: #fef2f2;
    /* Very light red bg */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #fee2e2;
    --focus-ring: rgba(249, 115, 22, 0.2);
    --radius: 24px;
    --shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.1), 0 8px 10px -6px rgba(239, 68, 68, 0.05);
    --gradient: linear-gradient(135deg, #f97316 0%, #ef4444 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;
}

.top-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

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

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    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: 3rem;
    border-radius: var(--radius);
    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.75rem;
}

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

.input-group input {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fffcfc;
}

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

.result-group input {
    background: #fffafa;
    border-color: #fca5a5;
    color: #991b1b;
    font-weight: 700;
    cursor: default;
}

.arrow-divider {
    text-align: center;
    font-size: 2rem;
    color: #f87171;
    line-height: 1;
    margin: -0.5rem 0;
}

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

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

.btn-nav {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3);
}

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

.btn-outline:hover {
    background: #fff1f1;
    border-color: #fca5a5;
}

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

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

.info-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #991b1b;
}

.info-section h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    color: var(--text-main);
}

.info-section p {
    margin-bottom: 1.25rem;
    color: #475569;
    font-size: 1.05rem;
}

.info-section ul,
.info-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-section li {
    margin-bottom: 0.5rem;
    color: #475569;
}

.info-section hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 2px solid var(--border-color);
}

.info-section pre {
    background: #fff5f5;
    padding: 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    color: #ef4444;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 1.2rem;
    border-left: 5px solid #ef4444;
}

.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

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

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

th {
    background: #fff8f8;
    color: #991b1b;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

tr:last-child td {
    border-bottom: none;
}

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

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

.footer-links a {
    color: #ef4444;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #f97316;
}

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

    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;
    }

    body {
        padding: 1rem;
    }
}

/* Related Tools Flashcards */
.related-tools {
    margin: 3rem 0;
}

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

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

.tool-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: 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);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.1);
    background: #fffafa;
}

.tool-name {
    font-size: 0.95rem;
}

.tool-arrow {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-arrow {
    transform: translateX(4px);
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}