#ratio-calc-container {
    --bg-grey: #e2e8f0;
    --box-bg: #ffffff;
    --text-dark: #334155;
    --text-muted: #64748b;
    --primary-green: #10b981;
    --hover-green: #059669;
    --light-green: #d1fae5;
    --border-color: #cbd5e1;
    
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-grey);
    padding: 30px 20px;
    border-radius: 12px;
    box-sizing: border-box;
}

.ratio-header {
    text-align: center;
    margin-bottom: 30px;
}

.ratio-header h2 {
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 28px;
    font-weight: bold;
}

.ratio-header p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
}

.ratio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.ratio-box {
    background-color: var(--box-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--primary-green);
    display: flex;
    flex-direction: column;
}

.ratio-box h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: var(--text-dark);
}

.ratio-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.4;
}

.ratio-input-group {
    margin-bottom: 15px;
    flex-grow: 1;
}

.ratio-input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.ratio-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ratio-row span {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-muted);
}

.ratio-equals {
    text-align: center;
    font-weight: bold;
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

#ratio-calc-container input[type="number"], 
#ratio-calc-container input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: #f8fafc;
    color: var(--text-dark);
    transition: all 0.3s ease;
    margin: 0;
}

#ratio-calc-container input:focus {
    outline: none;
    border-color: var(--primary-green);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

button.ratio-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: auto;
}

button.ratio-btn:hover {
    background-color: var(--hover-green);
}

.ratio-result {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-green);
    border-left: 4px solid var(--primary-green);
    border-radius: 6px;
    display: none;
}

.ratio-result p {
    margin: 6px 0;
    line-height: 1.4;
    color: #064e3b;
    font-size: 15px;
}

.ratio-error {
    color: #ef4444;
    background-color: #fee2e2;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    display: none;
}