/* style.css - LocalQuest Premium Mobile-First Styling */
@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary: #10B981; /* Emerald Green - Sustainability & Community */
    --primary-dark: #059669;
    --primary-light: #D1FAE5;
    
    --secondary: #0ea5e9; /* Sky Blue - Travel & Exploration */
    --secondary-dark: #0284c7;
    --secondary-light: #e0f2fe;

    --accent: #f59e0b; /* Amber/Orange - Gamification, Coins, Stars */
    --danger: #ef4444; /* Coral Red - Costs/Limits */
    
    --dark: #0f172a; /* Slate 900 - Dark Text / Dark Mode */
    --light-bg: #f8fafc; /* Slate 50 - Background */
    --card-bg: rgba(255, 255, 255, 0.85); /* Glassmorphism card bg */
    --border-color: rgba(226, 232, 240, 0.8);
    
    --font-head: 'Mitr', 'Outfit', sans-serif;
    --font-body: 'Outfit', 'Mitr', sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--light-bg);
    background-image: 
        radial-gradient(at 0% 0%, hsla(150, 80%, 95%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(200, 80%, 95%, 1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--dark);
    font-family: var(--font-body);
    line-height: 1.6;
    padding-bottom: 80px; /* Safe space for bottom navigation bar */
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* Mobile Container Constraint */
.app-container {
    width: 100%;
    max-width: 480px; /* Force mobile aspect ratio on desktop */
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 40px rgba(15, 23, 42, 0.05);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 500;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 24px 20px 28px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.brand-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.brand-title {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-slogan {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

/* User Profile & Wallet Quick Dashboard */
.wallet-bar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.user-xp-info {
    display: flex;
    flex-direction: column;
}

.user-level {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent);
    color: var(--dark);
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 4px;
}

.xp-progress-bar-bg {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-top: 4px;
    overflow: hidden;
}

.xp-progress-bar {
    height: 100%;
    background: #fff;
    width: 60%;
    border-radius: 10px;
    transition: var(--transition);
}

.wallet-coins {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-pill {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

.coin-icon {
    color: var(--accent);
    animation: pulseCoin 2s infinite;
}

@keyframes pulseCoin {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0.7)); }
    70% { transform: scale(1.1); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0)); }
}

/* Main Content Area */
main {
    flex: 1;
    padding: 20px;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.page.active {
    display: block;
}

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

/* Community Selector */
.community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.community-selector-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.community-selector-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* Info Cards / Project Deck */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.3);
}

.card h2 {
    color: var(--secondary-dark);
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
}

.card p {
    font-size: 0.95rem;
    color: #475569;
    text-align: justify;
}

.card ul {
    list-style-type: none;
    margin-top: 10px;
}

.card li {
    font-size: 0.9rem;
    color: #334155;
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.card li::before {
    content: '✓';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

.price-item span.cost {
    font-weight: 600;
    color: var(--danger);
}

.highlight-box {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 14px;
}

/* Quests Section */
.quest-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quest-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition);
}

.quest-card.completed {
    border-color: var(--primary);
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), #ffffff);
}

.quest-card.new-badge::after {
    content: 'เริ่มต้น';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.quest-card.completed::after {
    content: 'สำเร็จแล้ว';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.quest-title-row {
    padding-right: 60px;
}

.quest-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.quest-desc {
    font-size: 0.85rem;
    color: #64748b;
}

.quest-rewards {
    display: flex;
    gap: 10px;
    align-items: center;
}

.reward-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.reward-badge.xp {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary-dark);
}

.reward-badge.coin {
    background: rgba(245, 158, 11, 0.10);
    color: #d97706;
}

.btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

.btn-disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

/* Loot Shop Section */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.shop-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.shop-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.shop-img-container {
    height: 110px;
    background: #f1f5f9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.5rem;
    overflow: hidden;
}

.shop-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-stock {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.shop-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.shop-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.2;
    min-height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.shop-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #d97706;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Modal Popup Window */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInOverlay 0.25s ease-out;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes scaleUp {
    from { transform: scale(0.9) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
}

/* Camera Simulation Style */
.camera-container {
    background: #000;
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay-prompt {
    position: absolute;
    border: 2px dashed rgba(255,255,255,0.6);
    width: 80%;
    height: 80%;
    pointer-events: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.photo-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: none;
    margin-bottom: 16px;
}

/* Receipt input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
}

.input-field {
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--dark);
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.input-helper {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 900;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    height: 100%;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary-dark);
}

.nav-item.active svg {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Slip Styles (Loot Claim Coupon) */
.slip-container {
    background: #fff;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
}

.slip-title {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.slip-divider {
    width: 100%;
    border-top: 1px dashed var(--border-color);
    margin: 4px 0;
}

.slip-detail-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #475569;
}

.slip-code {
    font-family: monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--dark);
    letter-spacing: 2px;
    background: #f1f5f9;
    padding: 6px 16px;
    border-radius: 6px;
    margin: 8px 0;
}

.slip-qr-mock {
    width: 120px;
    height: 120px;
    background: #fff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    position: relative;
}

/* Simple QR Mock code styling */
.qr-line-decor {
    width: 100px;
    height: 100px;
    background-image: 
        radial-gradient(var(--dark) 20%, transparent 20%),
        radial-gradient(var(--dark) 20%, transparent 20%);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    opacity: 0.8;
}

.slip-timer {
    font-size: 0.75rem;
    color: var(--danger);
    font-weight: 500;
}

/* Toast Notification */
.toast-msg {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-lg);
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Success Sparkle Animation */
.sparkle-badge {
    position: absolute;
    pointer-events: none;
    font-size: 1.5rem;
    animation: floatUp 1s ease-out forwards;
    z-index: 100;
}

@keyframes floatUp {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(1.2); opacity: 0; }
}

/* Leaderboard custom styles */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.leader-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
}

.leader-item.current-user {
    background: var(--primary-light);
    border-color: var(--primary);
}

.leader-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cbd5e1;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    margin-right: 12px;
}

.leader-item:nth-child(1) .leader-rank { background: #f59e0b; color: white; }
.leader-item:nth-child(2) .leader-rank { background: #94a3b8; color: white; }
.leader-item:nth-child(3) .leader-rank { background: #b45309; color: white; }

.leader-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.leader-score {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary-dark);
}

/* Search and Region Tabs in Modal */
.search-container {
    margin-bottom: 12px;
}
.search-box {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}
.search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.region-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
    scrollbar-width: none;
}
.region-tabs::-webkit-scrollbar {
    display: none;
}
.region-tab-btn {
    background: #f1f5f9;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.region-tab-btn.active {
    background: var(--primary);
    color: white;
}
.province-scroll-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}
.province-scroll-list::-webkit-scrollbar {
    width: 6px;
}
.province-scroll-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Active Coupons List Styles */
.active-coupon-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.active-coupon-card:hover {
    border-color: var(--primary);
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-md);
}
.active-coupon-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.active-coupon-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.active-coupon-expiry {
    font-size: 0.75rem;
    color: var(--secondary-dark);
    font-weight: 500;
}
.active-coupon-btns {
    display: flex;
    gap: 6px;
}
.active-coupon-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Level Up Custom Modal Theme */
.modal-content.level-up-theme {
    border: 3px solid #f59e0b;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
    box-shadow: 0 20px 25px -5px rgba(245, 158, 11, 0.2), 0 10px 10px -5px rgba(245, 158, 11, 0.1);
}
.modal-content.level-up-theme .modal-header {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Firework Particle Effect */
.firework-particle {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1002;
    animation: explode 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.2);
        opacity: 0;
    }
}

/* Merchant Restocking Alert UI */
.alert-container-simulation {
    padding: 16px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.alert-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.alert-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}
.alert-log-box {
    width: 100%;
    background: #0f172a;
    color: #38bdf8;
    font-family: monospace;
    font-size: 0.75rem;
    padding: 10px;
    border-radius: 6px;
    height: 80px;
    overflow-y: auto;
}
.shop-card.out-of-stock {
    opacity: 0.85;
}
.shop-card.out-of-stock .shop-img-container {
    filter: grayscale(1);
}
.stock-alert-badge {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    position: absolute;
    top: 6px;
    right: 6px;
}

/* Authentication Login Screen Overlay */
.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
    z-index: 1500; /* Over bottom navigation and modal */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeInOverlay 0.3s ease-out;
}
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.auth-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    box-shadow: var(--shadow-md);
}
.auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1;
}
.auth-subtitle {
    font-size: 0.9rem;
    color: #475569;
    margin-top: -8px;
    text-align: center;
}


