body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 20px;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.home-btn {
    text-decoration: none;
    font-size: 1.5rem;
    padding: 5px 10px;
    background: #333;
    border-radius: 8px;
    transition: 0.2s;
}

.lang-switch {
    cursor: pointer;
    background: #333;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 1.2rem;
    user-select: none;
}

.home-btn:hover, .lang-switch:hover {
    background: #444;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

header h1 {
    margin-bottom: 5px;
    color: #fff;
}
header p {
    color: #888;
    margin-bottom: 25px;
}

.converter-box {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #333;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-row.full {
    flex-direction: column;
    text-align: left;
    margin-bottom: 0;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

label {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #aaa;
}

input, select {
    background: #2c2c2c;
    border: 1px solid #444;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: #ff4d4d;
}

.results-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr); 
}

@media (min-width: 600px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.result-card {
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 15px 5px;
    border-radius: 8px;
    text-align: center;
}

.result-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff4d4d;
    margin-bottom: 5px;
}

.result-unit {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
}