/* style.css (Final Version) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #5f259f; --primary-light: #f3e8ff;
    --surface: #ffffff; --bg: #f9fafb; --text-main: #1f2937; --text-sub: #6b7280;
    --border: #e5e7eb; --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg); color: var(--text-main); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; width: 100%; }
a { text-decoration: none; }

/* --- HEADER & TRUST LINE --- */
header { background: var(--surface); padding: 16px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.navbar { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 800; font-size: 1.5rem; color: var(--text-main); }
.brand span { color: var(--primary); }
.header-signin-btn { background-color: var(--primary); color: white; padding: 10px 20px; border-radius: 8px; font-weight: 600; }
.trust-line { text-align: center; background-color: var(--primary-light); color: var(--primary); font-size: 0.85rem; padding: 8px; font-weight: 500; }
.trust-line span { margin: 0 10px; }

/* --- TABS & SERVICE GRID --- */
.page-controls { padding: 40px 0 20px 0; }
.service-tabs { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.tab-btn { padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--text-sub); border: 1px solid var(--border); transition: all 0.2s ease; }
.tab-btn.active { background-color: var(--primary); color: white; border-color: var(--primary); }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 25px; text-align: center; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); transition: left 0.5s; }
.service-card:hover::before { left: 100%; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(95, 37, 159, 0.15); border-color: var(--primary); }
.card-qty { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.card-price { background-color: var(--primary-light); color: var(--primary); font-weight: 700; padding: 6px 15px; border-radius: 20px; display: inline-block; margin-bottom: 15px; }
.card-micro-detail { font-size: 0.8rem; color: var(--text-sub); margin-top: auto; padding-top: 15px; border-top: 1px dashed #e5e7eb; }

/* --- HOW IT WORKS & FOOTER --- */
.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 40px; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; text-align: center; }
.step-item .step-number { background-color: var(--primary); color: white; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; margin-bottom: 15px; }
.step-item h3 { font-size: 1.1rem; margin-bottom: 5px; }
footer { text-align: center; padding: 40px 20px; color: var(--text-sub); font-weight: 500; border-top: 1px solid var(--border); background: var(--surface); margin-top: 60px; }

/* --- PAYMENT & WALLET PAGES --- */
.page-wrapper { max-width: 480px; margin: 40px auto; background: var(--surface); border-radius: 16px; border: 1px solid var(--border); padding: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.page-title { text-align: center; font-size: 1.8rem; margin-bottom: 8px; font-weight: 700; }
.page-subtitle { text-align: center; color: var(--text-sub); margin-bottom: 30px; }
.upi-id-box { background-color: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; align-items: center; margin: 15px 0; }
.upi-id-box span { font-weight: 600; font-family: monospace; }
.copy-btn { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 0.8rem; }
.supported-apps { text-align: center; color: var(--text-sub); font-size: 0.8rem; }
.supported-apps span { margin: 0 5px; font-weight: 500; }
.payment-note { font-size: 0.8rem; color: var(--text-sub); text-align: center; margin-top: 15px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-weight: 500; color: var(--text-sub); margin-bottom: 8px; font-size: 0.9rem; }
.input-field { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; }
.btn { width: 100%; padding: 14px; border-radius: 8px; border: none; font-weight: 700; cursor: pointer; transition: background-color 0.2s; font-size: 1rem; }
.btn-confirm { background-color: var(--primary); color: white; }
.btn:disabled { background-color: #e5e7eb; color: var(--text-sub); cursor: not-allowed; }
.info-box { background-color: var(--primary-light); color: var(--primary); padding: 15px; border-radius: 8px; margin: 20px 0; font-weight: 500; text-align: center; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.data-table th, .data-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background-color: var(--primary); font-weight: 600; color: white; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:hover { background-color: #fafafa; transition: background-color 0.2s ease; }
.data-table tr:last-child td { border-bottom: none; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; text-transform: capitalize; }
.status-processing { background-color: #fffbeb; color: var(--warning); }
.status-completed { background-color: #ecfdf5; color: var(--success); }
.status-pending_payment { background-color: #fee2e2; color: var(--danger); }
.stat-card { background-color: var(--bg); border-radius: 12px; padding: 20px; margin-bottom: 15px; }
.stat-title { font-weight: 600; color: var(--text-sub); font-size: 0.9rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--text-main); margin-top: 5px; }

/* --- MICRO UX --- */
.toast-notification { position: fixed; bottom: 20px; left: 20px; background: #2d3748; color: white; padding: 12px 20px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 0.9rem; z-index: 1000; opacity: 0; transform: translateY(20px); transition: all 0.4s ease; }
.toast-notification.show { opacity: 1; transform: translateY(0); }

/* --- ANIMATIONS & HOVER EFFECTS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes success-bounce { 0% { transform: scale(0.8); opacity: 0; } 50% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

.service-card { animation: fadeInUp 0.5s ease-out; }
.service-card:hover .card-qty { animation: pulse 0.6s ease-in-out; }
.btn-confirm:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(95, 37, 159, 0.3); }
.btn-confirm:active:not(:disabled) { transform: translateY(0); }
.header-signin-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(95, 37, 159, 0.3); transition: all 0.2s ease; }
.tab-btn:hover:not(.active) { background-color: var(--primary-light); color: var(--primary); }

/* Success animation */
.success-check { animation: success-bounce 0.5s ease-out; display: inline-block; }

/* Status badge animations */
.status-badge { transition: all 0.3s ease; }
.status-processing { background-color: #fffbeb; color: var(--warning); animation: pulse 2s infinite; }
.status-completed { background-color: #ecfdf5; color: var(--success); }
.status-pending_payment { background-color: #fee2e2; color: var(--danger); }

/* Copy button effect */
.copy-btn:hover { background-color: var(--primary-light); padding: 4px 8px; border-radius: 4px; transition: all 0.2s ease; }
.copy-btn:active { transform: scale(0.95); }

/* Responsive grid improvements */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr !important; }
  .service-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .toast-notification { left: 10px; right: 10px; bottom: 10px; font-size: 0.85rem; }
  .page-wrapper { margin: 20px; padding: 20px; }
  header { padding: 12px 0; }
  .brand { font-size: 1.3rem; }
  .section { padding: 40px 0; }
}

/* Balance System Animations */
.balance-value {
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.balance-update {
  animation: balancePulse 0.6s ease-out;
}

@keyframes balancePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); color: #fbbf24; }
  100% { transform: scale(1); }
}

.balance-card {
  transition: all 0.3s ease;
}

.balance-card.syncing {
  animation: cardGlow 1.5s ease-in-out infinite;
}

@keyframes cardGlow {
  0%, 100% { box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6); }
}

.balance-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.balance-increase {
  animation: increaseFlash 0.8s ease-out;
}

@keyframes increaseFlash {
  0%, 100% { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
  50% { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); }
}

.balance-decrease {
  animation: decreaseFlash 0.8s ease-out;
}

@keyframes decreaseFlash {
  0%, 100% { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
  50% { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
}

@keyframes slideInRight {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(400px); opacity: 0; }

}

/* ======================= FOOTER STYLES ======================= */
.site-footer {
    background: linear-gradient(135deg, #5f259f 0%, #7e4dd2 100%);
    color: #e2e8f0;
    padding: 70px 0 30px 0;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
    position: relative;
    flex-shrink: 0;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #10b981, #5f259f, #10b981);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-bottom: 30px;
}

.footer-column .brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
    letter-spacing: -0.5px;
}

.footer-column .brand span {
    color: #f0abfc;
}

.footer-column p {
    margin: 0;
    line-height: 1.7;
    color: #cbd5e1;
}

.footer-column.about .about-text {
    max-width: 300px;
    margin-bottom: 20px;
}

.footer-column h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #10b981;
    border-radius: 3px;
}

/* Styling for the link lists */
.footer-column.links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column.links ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
}

.footer-column.links ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.footer-column.links ul a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-column.links ul a:hover {
    color: white;
    text-decoration: none;
    padding-left: 5px;
}

/* Social media icons */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
}

.social-links a:hover {
    background: white;
    color: #5f259f;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Contact email link */
.contact-email {
    color: #10b981;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.contact-email:hover {
    background: rgba(16, 185, 129, 0.1);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Newsletter signup */
.newsletter-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.9rem;
}

.newsletter-form input::placeholder {
    color: #94a3b8;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-form button {
    padding: 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* Bottom bar with copyright */
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #94a3b8;
}

.footer-bottom p {
    margin: 0;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-footer {
        padding: 50px 0 20px 0;
    }
    
    .footer-content {
        text-align: center;
        gap: 40px;
    }
    
    .footer-column {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-column.about .about-text {
        max-width: 100%;
    }
    
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-column.links ul li {
        padding-left: 0;
        justify-content: center;
    }
    
    .footer-column.links ul li::before {
        display: none;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}




/* ======================= HEADER STYLES ======================= */

/* Root variables for consistent colors (ensure this is at the top of your CSS) */
:root {
    --primary: #5f259f;
    --surface: #ffffff;
    --bg: #F5F7FA;
    --text-main: #111827;
    --text-sub: #6B7280;
    --border: #E5E7EB;
    --badge: #F43F5E;
}

/* Main Header Container */
header {
    background: var(--surface);
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand Logo */
.brand {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    text-decoration: none; /* In case you wrap it in an <a> tag */
    color: var(--text-main);
}
.brand span {
    color: var(--primary);
}

/* "System Online" Pill */
.status-pill {
    background: #ECFDF5;
    color: #10B981;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #D1FAE5;
}
.dot {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Hover effects for auth elements */
#header-balance:hover {
    transform: scale(1.05);
}
#wallet-btn:hover, #signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(95, 37, 159, 0.4);
}

/* --- Mobile Navigation Styles --- */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hidden by default on mobile */
        position: absolute;
        top: 70px; /* Position below the header */
        right: 20px;
        background-color: var(--surface);
        width: 220px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-radius: 8px;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        gap: 0;
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-links > * {
        width: 100%;
        padding: 12px 15px;
        margin: 5px 0;
        box-sizing: border-box; /* Important for correct padding */
    }

    /* Make buttons full-width inside the mobile menu */
    .nav-links #signin-btn, .nav-links #wallet-btn {
        text-align: center;
        justify-content: center;
    }
    
    /* Hide the "System Online" pill in the mobile dropdown to save space */
    .nav-links .status-pill {
        display: none;
    }

    .menu-toggle {
        display: flex; /* Show the hamburger button on mobile */
    }
}
