:root {
    --primary: #006cad;
    --primary-dark: #005a91;
    --secondary: #eef2f6;
    --accent: #ff4d4d;
    --success: #2ecc71;
    --text-main: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--primary);
    background-image: radial-gradient(circle at 50% 50%, #007bc4 0%, #006cad 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    max-width: 480px;
    width: 100%;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    max-width: 200px;
    margin-bottom: 30px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group {
    margin-bottom: 24px;
    text-align: left;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
}

input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--secondary);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
    color: var(--text-main);
    font-weight: 500;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 108, 173, 0.1);
}

.color-feedback {
    display: block;
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 8px;
    min-height: 20px;
}

.motor-section {
    margin: 30px 0;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-light);
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-motor {
    background-color: var(--secondary);
    color: var(--primary);
}

.btn-motor:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 108, 173, 0.2);
}

.btn-motor.active {
    background-color: var(--primary);
    color: var(--white);
}

.btn-clear {
    width: 100%;
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--secondary);
}

.btn-clear:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: var(--text-main);
}

.result-area {
    margin-top: 30px;
    padding: 20px;
    border-radius: var(--radius);
    background-color: var(--secondary);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-text {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

.result-quantity {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 8px;
}

.warning {
    color: var(--accent);
    font-weight: 700;
}

.error {
    color: var(--accent);
    font-size: 14px;
    margin-top: 10px;
}

footer {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .container {
        padding: 25px;
    }
    .button-grid {
        grid-template-columns: 1fr;
    }
}
