:root {
    --primary: #ef4444;
    --primary-hover: #dc2626;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 1rem;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

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

.converter-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    max-width: 480px;
    margin: 0 auto 4rem auto;
}

h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.result {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fef2f2;
    border-radius: 0.5rem;
    text-align: center;
    border: 1px solid #fee2e2;
}

.result h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.ads-container {
    margin: 2rem auto;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    background: #f1f5f9;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

@media (max-width: 640px) {
    .container {
        padding: 0.5rem;
    }

    .converter-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    h1 {
        font-size: 1.75rem;
    }
}

/* Tools Grid/Flashcards */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 4rem 0;
}

.tool-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 12px 20px -10px rgba(239, 68, 68, 0.2);
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.tool-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

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