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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.purple-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.green-gradient {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h1 {
    color: white;
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.card h2 {
    color: #2d3748;
    font-size: 1.5em;
    margin-bottom: 5px;
}

.subtitle {
    color: #718096;
    margin-bottom: 25px;
}

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

label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
}

input, select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
}

.wallet-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.amount-input {
    position: relative;
}

.currency {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.amount-input input {
    padding-left: 45px;
}

.fee-summary {
    background: #f7fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #4a5568;
}

.fee-row.total {
    border-top: 2px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

.total-amount {
    color: #667eea;
    font-size: 1.3em;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 12px 24px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary.active {
    background: #667eea;
    color: white;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-group .btn-primary,
.btn-group .btn-secondary {
    flex: 1;
}

.btn-text {
    display: block;
    text-align: center;
    color: #667eea;
    text-decoration: none;
    margin-top: 15px;
    font-weight: 600;
}

.wallet-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.wallet-waafi {
    background: #d4edda;
    color: #155724;
}

.wallet-dmoney {
    background: #cce5ff;
    color: #004085;
}

.wallet-cac_pay {
    background: #fff3cd;
    color: #856404;
}

.summary-box {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-section {
    margin-bottom: 20px;
}

.summary-section h3 {
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 10px;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 8px;
}

.number {
    font-weight: 600;
    color: #2d3748;
}

.arrow {
    text-align: center;
    color: #667eea;
    font-size: 1.5em;
    margin: -10px 0;
}

.amount-details {
    background: white;
    border-radius: 12px;
    padding: 15px;
}

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

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

.detail-row.total {
    font-weight: bold;
    font-size: 1.1em;
    color: #667eea;
}

.info-box {
    background: #e6fffa;
    border-left: 4px solid #38b2ac;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.info-box p {
    color: #234e52;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border-left: 4px solid #c53030;
}

/* Payment Page Styles */
.header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.check-icon {
    width: 60px;
    height: 60px;
    background: white;
    color: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    margin: 0 auto 15px;
    font-weight: bold;
}

.payment-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.payment-amount {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.big-amount {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-top: 10px;
}

.platform-number {
    text-align: center;
    margin: 30px 0;
}

.big-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2d3748;
    letter-spacing: 2px;
}

.small-text {
    color: #718096;
    font-size: 0.9em;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.action-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.action-btn:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.action-btn .icon {
    font-size: 1.5em;
}

.action-btn span:last-child {
    font-size: 0.75em;
    color: #4a5568;
}

.btn-large {
    margin-top: 20px;
}

/* Timeline Styles */
.timeline {
    margin: 30px 0;
}

.timeline-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 45px;
    width: 2px;
    height: calc(100% - 20px);
    background: #e2e8f0;
}

.timeline-item.completed:not(:last-child)::before {
    background: #48bb78;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-icon.green {
    background: #48bb78;
    color: white;
}

.timeline-icon.orange {
    background: #ed8936;
    color: white;
}

.timeline-item.active .timeline-icon {
    background: #ed8936;
    color: white;
}

.timeline-content h4 {
    color: #2d3748;
    margin-bottom: 5px;
}

.timeline-content p {
    color: #718096;
    font-size: 0.9em;
}

.small-text {
    color: #718096;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Success Page */
.success-card {
    background: white;
    border-radius: 20px;
    padding: 40px 25px;
    text-align: center;
    margin-bottom: 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    margin: 0 auto 20px;
}

.success-card h2 {
    color: white;
    margin-bottom: 10px;
}

.success-card p {
    color: rgba(255,255,255,0.9);
}

.details-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
}

.details-card .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.details-card .green {
    color: #48bb78;
    font-weight: 600;
}

.details-card .bold {
    font-weight: bold;
    color: #2d3748;
}

.divider {
    height: 1px;
    background: #e2e8f0;
    margin: 10px 0;
}

.copy-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
}

.refresh-box {
    text-align: center;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    
    .card {
        border-radius: 0;
        margin: 0 -20px 20px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}