/* ==========================================================================
   Conversor de Sistemas Numéricos - ElectroWeb
   ========================================================================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 780px;
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.2s;
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 180px;
    height: auto;
}

h1 {
    font-size: 26px;
    font-weight: 600;
    color: #1a2634;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subhead {
    color: #4a5b6e;
    font-size: 15px;
    border-left: 4px solid #3b82f6;
    padding-left: 14px;
    margin-bottom: 28px;
    background: #f0f4ff;
    border-radius: 0 12px 12px 0;
    line-height: 1.5;
}

.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group label .badge {
    font-size: 11px;
    background: #dbe0e8;
    padding: 2px 10px;
    border-radius: 30px;
    font-weight: 500;
    color: #1e2a3a;
}

.input-group input {
    padding: 12px 14px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    transition: 0.15s;
    background: #fafcff;
    width: 100%;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-group input::placeholder {
    color: #a0b3cc;
    font-weight: 400;
}

.input-group input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.error-msg {
    color: #dc2626;
    font-size: 13px;
    min-height: 20px;
    margin-top: 2px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0 16px;
    justify-content: center;
}

.btn {
    padding: 10px 22px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.15s;
    background: #eef2f6;
    color: #1e2a3a;
}

.btn-primary {
    background: #1e2a3a;
    color: white;
}

.btn-primary:hover {
    background: #2d3f55;
    transform: scale(1.02);
}

.btn-secondary {
    background: #e2e8f0;
}

.btn-secondary:hover {
    background: #d0d8e4;
}

.btn-outline {
    background: transparent;
    border: 2px solid #dbe0e8;
}

.btn-outline:hover {
    background: #f1f4f9;
}

.result-section {
    background: #0b1e2f;
    border-radius: 18px;
    padding: 18px 24px;
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.result-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #b0c7df;
    font-size: 15px;
    flex-wrap: wrap;
}

.result-item strong {
    color: white;
    font-weight: 600;
}

.result-value {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #7dd3fc;
    word-break: break-all;
}

.footer-note {
    margin-top: 24px;
    font-size: 13px;
    color: #5a6f84;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

@media (max-width: 600px) {
    .container { padding: 16px; }
    .converter-grid { grid-template-columns: 1fr; gap: 12px; }
    .result-section { flex-direction: column; align-items: stretch; }
    .result-item { justify-content: space-between; }
}
