@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    flex-shrink: 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: 20px; align-items: center; }

.nav-btn {
    text-decoration: none; color: var(--text-muted); font-size: 0.95rem; font-weight: 500;
    transition: 0.3s; display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.nav-btn:hover, .nav-btn.active { color: var(--text-main); }

.wallet-badge {
    background: rgba(16, 185, 129, 0.1); color: var(--success); padding: 6px 12px;
    border-radius: 20px; border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-primary {
    background: var(--primary); color: white; padding: 8px 18px; border-radius: 8px;
    text-decoration: none; border: none; cursor: pointer; font-size: 0.9rem; transition: 0.3s; white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-logout { background: var(--danger); padding: 8px 12px; }

.container { padding: 2rem 5%; max-width: 1200px; margin: 0 auto; width: 100%; flex: 1; }
.auth-wrapper { flex: 1; display: flex; justify-content: center; align-items: center; padding: 20px; width: 100%; }
.auth-container {
    width: 100%; max-width: 400px; padding: 2.5rem; background: var(--card-bg);
    border-radius: var(--radius); text-align: center; border: 1px solid var(--card-border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.page-title { margin-bottom: 1.5rem; font-size: 1.8rem; text-align: left; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

.card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius);
    padding: 1.5rem; transition: transform 0.2s; display: flex; flex-direction: column; justify-content: space-between;
}
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.flag-icon { font-size: 2rem; }
.stock-badge { background: #334155; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; color: var(--success); }

.card-body-row { display: flex; justify-content: space-between; align-items: flex-end; margin: 15px 0 20px 0; gap: 15px; }
.price-section { display: flex; flex-direction: column; }
.price-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 2px; }
.price-value { font-size: 1.5rem; font-weight: 700; color: var(--text-main); line-height: 1; }
.price-unit { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.qty-section { width: 90px; }
.qty-section input { margin: 0; text-align: center; padding: 8px; font-weight: 600; }

input, select {
    width: 100%; padding: 12px; background: #0f172a; border: 1px solid var(--card-border);
    border-radius: 8px; color: white; margin: 10px 0; font-size: 1rem;
}
input:focus { outline: 1px solid var(--primary); }

.tab-container {
    display: flex; background: #0f172a; border: 1px solid var(--card-border);
    padding: 5px; border-radius: 12px; margin-bottom: 20px; gap: 5px;
}
.tab-btn {
    flex: 1; padding: 10px; border: none; background: transparent; color: var(--text-muted);
    border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s;
}
.tab-btn.active { background: var(--card-bg); color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.tab-content { display: none; animation: fadeIn 0.3s ease-in-out; }
.tab-content.active { display: block; }

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

#notification-area { position: fixed; top: 20px; right: 20px; z-index: 1000; }
.toast {
    background: var(--card-bg); border-left: 4px solid var(--primary); color: white;
    padding: 15px 20px; margin-bottom: 10px; border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); animation: slideIn 0.3s ease-out;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.wallet-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.timer-box { font-family: monospace; font-size: 1.1rem; color: var(--warning); }
.otp-display { 
    background: #000; padding: 10px; text-align: center; letter-spacing: 5px; 
    font-size: 1.5rem; border-radius: 6px; margin: 10px 0; border: 1px dashed var(--text-muted);
}

/* UPDATED QR BOX SIZE */
.qr-box { 
    background: white; 
    padding: 10px; 
    width: 200px; /* Increased from 150px */
    margin: 10px auto; 
    border-radius: 8px; 
}

.copy-row { display: flex; gap: 10px; }

@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 15px; }
    .nav-links { width: 100%; justify-content: center; flex-wrap: wrap; gap: 15px; }
    .page-title { text-align: center; font-size: 1.5rem; }
    .grid-cards { grid-template-columns: 1fr; }
    .auth-container { padding: 1.5rem; }
}