/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'DaggerSquare';
    src: url('DAGGERSQUARE.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'DaggerSquare';
    src: url('DAGGERSQUARE_OBLIQUE.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: #333;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5f5f5;
    position: relative;
}

/* ===== HEADER ===== */
.header {
    background: #000000;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid #FDB913;
}

.logo {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-text {
    font-family: 'DaggerSquare', sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: #FDB913;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

.balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #FDB913 0%, #F7931E 100%);
    padding: 12px 16px;
    border-radius: 12px;
    color: #000000;
}

.balance-label {
    font-size: 14px;
    font-weight: 600;
}

.balance-amount {
    font-size: 24px;
    font-weight: bold;
}

/* ===== PANTALLAS ===== */
.screen {
    display: none !important;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block !important;
}

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

/* ===== LOADING ===== */
#loadingScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(253, 185, 19, 0.2);
    border-top-color: #FDB913;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== AUTENTICACIÓN (LOGIN/REGISTER) ===== */
.auth-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    margin: 20px auto;
}

.auth-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.auth-card h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.auth-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #FDB913;
    box-shadow: 0 0 0 3px rgba(253, 185, 19, 0.1);
}

.form-group small {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.auth-switch {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-switch p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.btn-link {
    background: none;
    border: none;
    color: #FDB913;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: #F7931E;
}

/* ===== INFORMACIÓN MÁQUINA ===== */
.machine-info {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.machine-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.machine-location {
    font-size: 14px;
    color: #666;
}

/* ===== SECCIÓN LAVADO ===== */
.action-section {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 20px;
}

.wash-price {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.price-label {
    font-size: 16px;
    color: #666;
    font-weight: 600;
}

.amount-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.btn-amount {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #FDB913;
    background: white;
    color: #FDB913;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-amount:hover {
    background: #FDB913;
    color: #000000;
    transform: scale(1.1);
}

.btn-amount:active {
    transform: scale(0.95);
}

.btn-amount:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-amount:disabled:hover {
    background: white;
    color: #FDB913;
    transform: scale(1);
}

.amount-display {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 100px;
    justify-content: center;
}

.amount-value {
    font-size: 48px;
    font-weight: bold;
    color: #333;
}

.amount-currency {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.action-note {
    font-size: 13px;
    color: #999;
    margin-top: 12px;
}

.action-note span {
    color: #FDB913;
    font-weight: bold;
}

/* ===== AVISO SALDO INSUFICIENTE ===== */
.insufficient-balance-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.warning-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.warning-text {
    flex: 1;
    color: white;
}

.warning-text strong {
    font-size: 15px;
    display: block;
    margin-bottom: 2px;
}

.warning-text p {
    font-size: 13px;
    margin: 0;
    opacity: 0.95;
}

.btn-warning-recharge {
    background: white;
    color: #f57c00;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

.btn-warning-recharge:hover {
    transform: scale(1.05);
}

.btn-warning-recharge:active {
    transform: scale(0.95);
}

/* ===== BOTONES ===== */
.btn-primary {
    background: linear-gradient(135deg, #FDB913 0%, #F7931E 100%);
    color: #000000;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(253, 185, 19, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 185, 19, 0.6);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-large {
    width: 100%;
    padding: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-icon {
    font-size: 24px;
}

.btn-icon svg {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
}

.btn-secondary {
    background: white;
    color: #FDB913;
    border: 2px solid #FDB913;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-secondary:hover {
    background: #FDB913;
    color: #000000;
}

/* ===== SEPARADOR ===== */
.separator {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
    z-index: 0;
}

.separator span {
    background: #f5f5f5;
    padding: 0 15px;
    position: relative;
    z-index: 1;
    color: #999;
    font-size: 14px;
}

/* ===== OPCIONES DE RECARGA ===== */
.recharge-section {
    background: white;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.recharge-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.recharge-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.recharge-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;
}

.recharge-option:hover {
    border-color: #FDB913;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 185, 19, 0.3);
}

.recharge-option.recommended {
    border-color: #FDB913;
    background: linear-gradient(135deg, rgba(253, 185, 19, 0.08) 0%, rgba(247, 147, 30, 0.08) 100%);
}

.option-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: #FDB913;
    color: #000000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.option-amount {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.option-bonus {
    font-size: 14px;
    color: #FDB913;
    font-weight: 600;
}

.payment-methods {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.payment-methods span {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.payment-icons {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* ===== HISTORIAL ===== */
.history-section {
    margin-bottom: 20px;
}

/* ===== CONFIRMACIÓN ===== */
.confirm-card,
.success-animation,
.error-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.confirm-icon,
.success-icon,
.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 48px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.error-icon {
    color: #f44336;
}

h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.confirm-details,
.activation-details {
    margin: 30px 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.total {
    font-weight: bold;
    font-size: 18px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.price {
    color: #FDB913;
    font-weight: bold;
}

.balance-big {
    font-size: 28px;
    color: #FDB913;
    font-weight: bold;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .option-amount {
        font-size: 28px;
    }
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}
