* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #1e293b;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 48px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    border: 1px solid #e2e8f0;
}

header {
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: #3b82f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

header h1 {
    color: #1e293b;
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

header p {
    color: #64748b;
    margin-bottom: 32px;
    font-size: 1rem;
    font-weight: 500;
}

.phone-info, .payment-info {
    background: #f1f5f9;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    color: #475569;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.operator-badge {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* LOGIN PAGE */
.login-form {
    text-align: left;
}

.input-group {
    margin-bottom: 32px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 500;
}

/* BUTTONS */
.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 6px;
}

.btn-link:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.1);
}

.btn-copy {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-copy:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* SELECTION PAGE */
.recharge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.recharge-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.recharge-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.recharge-card.selected {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.recharge-card.highlight {
    border-color: #f59e0b;
    background: #f59e0b;
    color: white;
    position: relative;
}

.recharge-card.highlight::after {
    content: "POPULAR";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.recharge-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.recharge-price {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 600;
}

.recharge-card.selected .recharge-price,
.recharge-card.highlight .recharge-price {
    color: rgba(255, 255, 255, 0.9);
}

.recharge-bonus {
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 700;
    background: #ecfdf5;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #d1fae5;
}

.recharge-card.selected .recharge-bonus,
.recharge-card.highlight .recharge-bonus {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.selected-info {
    background: #f0fdf4;
    padding: 28px;
    border-radius: 16px;
    border: 2px solid #bbf7d0;
    text-align: left;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.selected-info h3 {
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-weight: 800;
    font-size: 1.1rem;
    color: #10b981;
    margin-top: 16px;
    padding-top: 20px;
    border-top: 2px solid #bbf7d0;
}

/* PAYMENT PAGE */
.loading-pix {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-pix p {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 600;
}

.pix-content {
    text-align: left;
}

.pix-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.qr-section {
    text-align: center;
}

.qr-section canvas {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.qr-help {
    margin-top: 12px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.details-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-details {
    background: #f0fdf4;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #10b981;
    border: 1px solid #bbf7d0;
}

.payment-details h3 {
    color: #1e293b;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .highlight {
    color: #10b981;
    font-weight: 800;
    font-size: 1.1rem;
}

.pix-code-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pix-code-section label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
}

.code-input {
    display: flex;
    gap: 12px;
}

.code-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    background: #f9fafb;
    font-weight: 500;
}

.instructions {
    background: #eff6ff;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    border: 1px solid #bfdbfe;
}

.instructions h4 {
    color: #3b82f6;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
}

.instructions ol {
    margin: 0;
    padding-left: 20px;
    color: #475569;
}

.instructions li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.status-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f59e0b;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.success {
    background: #10b981;
    animation: none;
}

.status-dot.error {
    background: #ef4444;
    animation: none;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

#statusText {
    font-weight: 600;
    color: #1e293b;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* ERROR MESSAGES */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 4px solid #ef4444;
    font-weight: 600;
    border: 1px solid #fecaca;
}

/* FOOTER */
footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

/* LOADING ANIMATION */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .container {
        padding: 32px 24px;
        margin: 0;
        border-radius: 12px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .recharge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .recharge-card {
        padding: 20px 16px;
    }
    
    .pix-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .qr-section {
        order: -1;
    }
    
    .qr-section canvas {
        max-width: 180px;
        max-height: 180px;
    }
    
    .code-input {
        flex-direction: column;
    }
    
    .btn-copy {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons > * {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 24px 20px;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .recharge-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}