:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #fcbf49;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-family: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.1rem;
    color: #666;
}

.converter {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.category-select, .input-group, .unit-selects {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

select, input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.unit-selects {
    display: flex;
    gap: 20px;
}

.unit-selects div {
    flex: 1;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

.result {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.result h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

#exactResult, #absurdResult {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    min-height: 40px;
    display: flex;
    align-items: center;
}

.absurd-result {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.absurd-table {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.absurd-table h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-color);
}

#absurdTable {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.absurd-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.absurd-item:hover {
    transform: translateY(-5px);
}

.absurd-item .emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.absurd-item .name {
    font-weight: 600;
    margin-bottom: 5px;
}

.absurd-item .meaning {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #777;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .unit-selects {
        flex-direction: column;
    }

    header h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }
}