/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 50px 50px;
    pointer-events: none;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    font-size: 2.5rem;
    color: #4ade80;
    background: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header-text h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.header-text p {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.language-selector {
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.lang-btn.active {
    background: #667eea;
    border-color: #667eea;
}

/* Main Content */
.main-content {
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Recharge Process Section */
.recharge-process {
    padding: 40px;
    border-bottom: 1px solid #f0f0f0;
}

.recharge-process h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.step {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.step.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.step.active .step-number {
    background: white;
    color: #667eea;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #667eea;
}

.step.active .step-icon {
    color: white;
}

.step h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step p {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Account Information */
.account-info {
    padding: 30px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.info-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.info-icon {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.info-card label {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: #2d3748;
    font-weight: 600;
}

/* Input Section */
.input-section {
    padding: 30px 40px;
    border-bottom: 1px solid #f0f0f0;
}

.input-group {
    margin-bottom: 25px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-icon {
    font-size: 1.2rem;
    color: #667eea;
    margin-bottom: 8px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

/* Notice Section */
.notice-section {
    padding: 20px 40px;
    border-bottom: 1px solid #f0f0f0;
}

.notice-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice-icon {
    color: #f59e0b;
    font-size: 1.2rem;
    margin-top: 2px;
}

.notice-content strong {
    color: #d97706;
    display: block;
    margin-bottom: 5px;
}

.notice-content p {
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Action Section */
.action-section {
    padding: 30px 40px;
    text-align: center;
}

.recharge-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.recharge-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.recharge-button:active {
    transform: translateY(0);
}

.history-button {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.history-button:hover {
    background: #667eea;
    color: white;
}

/* Status Section */
.status-section {
    padding: 20px 40px;
    border-bottom: 1px solid #f0f0f0;
}

.status-display {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.status-display.loading {
    border-color: #667eea;
    background: #f0f4ff;
}

.status-display.success {
    border-color: #10b981;
    background: #f0fdf4;
}

.status-display.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.status-icon {
    font-size: 1.2rem;
    color: #64748b;
}

.status-display.loading .status-icon {
    color: #667eea;
}

.status-display.success .status-icon {
    color: #10b981;
}

.status-display.error .status-icon {
    color: #ef4444;
}

.status-content {
    flex: 1;
}

.status-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 2px;
    font-weight: 500;
}

.status-value {
    font-size: 0.9rem;
    color: #2d3748;
    font-weight: 600;
}

.status-display.loading .status-value {
    color: #667eea;
}

.status-display.success .status-value {
    color: #10b981;
}

.status-display.error .status-value {
    color: #ef4444;
}

/* Footer */
.footer {
    padding: 20px 40px;
    background: #f8fafc;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.footer p {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.footer p:last-child {
    margin-bottom: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-icon, .error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.success-icon {
    color: #10b981;
}

.error-icon {
    color: #ef4444;
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2d3748;
}

.modal p {
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-close-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: #5a67d8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .account-info {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 0 10px;
        border-radius: 15px;
    }
    
    .recharge-process,
    .account-info,
    .input-section,
    .notice-section,
    .action-section,
    .status-section,
    .footer {
        padding: 20px;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.3rem;
    }
    
    .step {
        padding: 20px 15px;
    }
    
    .step h3 {
        font-size: 0.9rem;
    }
    
    .step p {
        font-size: 0.8rem;
    }
}

/* Subscription Plus Styles */
.info-value.plus-subscription {
    color: #10b981 !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    animation: plusGlow 2s ease-in-out infinite alternate;
}

@keyframes plusGlow {
    from {
        text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    }
    to {
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
}

.info-card.plus-active {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

/* History Modal Specific Styles */
#history-modal .modal-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 25px;
}

.history-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-header h3 i {
    color: #3b82f6;
    font-size: 1.6rem;
}

.history-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.history-filter-select {
    padding: 12px 18px;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    background: white;
    font-size: 15px;
    min-width: 180px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.history-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.refresh-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.refresh-btn i {
    font-size: 16px;
}

.clear-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.clear-btn i {
    font-size: 16px;
}

.history-list {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 25px;
    padding: 5px;
}

.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 15px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.history-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.history-item-info {
    flex: 1;
}

.history-item-email {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 16px;
}

.history-item-details {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.history-item-message {
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
    margin-top: 5px;
    padding: 4px 8px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #d1d5db;
}

.history-item-status {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-item-status.success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #86efac;
}

.history-item-status.failed {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.history-item-status.pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

.pagination-btn {
    padding: 12px 20px;
    border: 2px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 100px;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
}

#page-info {
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.history-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #94a3b8;
}

.history-empty h4 {
    margin: 0 0 15px 0;
    color: #475569;
    font-size: 1.3rem;
    font-weight: 600;
}

.history-empty p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

.history-loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.history-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    border-radius: 50%;
}
