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

/* Variables */
:root {
    --line-green: #06C755;
    --line-green-dark: #05B34C;
    --line-green-light: #E6F9EE;
    --primary: #0F172A;
    --secondary: #64748B;
    --bg-primary: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --bg-card: #FFFFFF;
    --accent: #3B82F6;
    --accent-light: #EFF6FF;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --warning: #F59E0B;
    --success: #10B981;
    --radius-full: 9999px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 30px -5px rgba(15, 23, 42, 0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hidden {
    display: none !important;
}

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

body {
    font-family: var(--font-sans);
    background-color: #0F172A; /* Slate 900 for external background */
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile-first Container Frame (simulating LINE Webview) */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    min-height: 100vh;
    background-color: var(--bg-primary);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 481px) {
    .app-container {
        height: 92vh;
        border-radius: 28px;
        border: 8px solid #1E293B;
    }
}

/* Header */
.app-header {
    background-color: var(--bg-card);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--bg-secondary);
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.simulation-banner {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-bottom: 1px solid #FCD34D;
    color: #92400E;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 9;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.simulation-banner:hover {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.banner-icon {
    font-size: 14px;
}

.banner-text {
    flex: 1;
    text-decoration: underline;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--line-green) 0%, var(--line-green-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.3);
}

.brand-name {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary) 30%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-sync {
    background-color: var(--bg-secondary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-sync:hover {
    background-color: #E2E8F0;
    color: var(--primary);
    transform: rotate(30deg);
}

.btn-sync.spinning svg {
    animation: spin 1s linear infinite;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.header-user-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--line-green);
    object-fit: cover;
}

/* Splash/Login Screen */
.screen {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 90px; /* Space for bottom nav */
    display: flex;
    flex-direction: column;
    animation: screenFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.screen-login {
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-card) 50%, var(--bg-primary) 100%);
}

.login-illustration {
    width: 140px;
    height: 140px;
    background: var(--line-green-light);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    animation: float 4s ease-in-out infinite;
}

.login-illustration svg {
    width: 70px;
    height: 70px;
    fill: var(--line-green);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.login-desc {
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 300px;
}

.btn-liff-login {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 20px rgba(6, 199, 85, 0.25);
    transition: var(--transition);
}

.btn-liff-login:hover {
    background-color: var(--line-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(6, 199, 85, 0.3);
}

.btn-demo-login {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
    background-color: transparent;
    color: var(--secondary);
    border: 2px dashed var(--secondary);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
    transition: var(--transition);
}

.btn-demo-login:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px 12px 10px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    width: 60px;
    height: 100%;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

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

.nav-item.active {
    color: var(--line-green);
    font-weight: 700;
}

.nav-item.active svg {
    transform: translateY(-2px);
    stroke: var(--line-green);
    fill: var(--line-green-light);
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    transition: var(--transition);
}

.nav-badge.pulse {
    animation: badgePulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.product-qty-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--line-green);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(6, 199, 85, 0.3);
    border: 2px solid white;
    z-index: 2;
    animation: badgePulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-event .product-qty-badge {
    background-color: var(--line-green);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Shop Screen Components */
.hero-banner {
    padding: 20px;
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: white;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(6, 199, 85, 0.15);
    filter: blur(20px);
}

.hero-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 15px;
}

.search-bar {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--line-green);
    box-shadow: 0 0 14px rgba(6, 199, 85, 0.3);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94A3B8;
}

/* Categories Section */
.categories-container {
    padding: 0 20px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-link {
    font-size: 12px;
    color: var(--line-green);
    cursor: pointer;
}

.category-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 8px 16px;
    background-color: var(--bg-card);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary);
    white-space: nowrap;
    border: 1px solid var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.category-pill.active {
    background: linear-gradient(135deg, var(--line-green-light) 0%, rgba(6, 199, 85, 0.15) 100%);
    color: var(--line-green-dark);
    border-color: var(--line-green);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.1);
}

.category-pill:not(.active):hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
    border-color: #CBD5E1;
    transform: translateY(-1px);
}

/* Products Grid */
.products-container {
    padding: 0 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

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

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    z-index: 2;
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background-color: #F8FAFC;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-img-wrapper svg {
    transition: var(--transition);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

.product-card:hover .product-img-wrapper svg {
    transform: scale(1.12) rotate(3deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 10px;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
    height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--line-green-dark);
}

.btn-add-cart-mini {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart-mini:hover {
    background-color: var(--line-green);
    color: white;
}

.btn-add-cart-mini svg {
    width: 14px;
    height: 14px;
}

/* Cart Screen */
.cart-items-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.cart-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    gap: 12px;
    border: 1px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    object-fit: contain;
    padding: 4px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--line-green-dark);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.quantity-controller {
    display: flex;
    align-items: center;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.btn-qty {
    width: 24px;
    height: 24px;
    background-color: var(--bg-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-qty:hover {
    background-color: var(--bg-secondary);
}

.qty-val {
    width: 30px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.btn-delete-item {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-item svg {
    width: 18px;
    height: 18px;
}

.cart-summary {
    background-color: var(--bg-card);
    border-top: 1px solid var(--bg-secondary);
    padding: 20px;
    margin-top: auto;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.02);
}

.promo-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.promo-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 13px;
    transition: var(--transition);
}

.promo-input:focus {
    border-color: var(--line-green);
}

.btn-promo-apply {
    padding: 10px 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.summary-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    border-top: 1px solid var(--bg-secondary);
    padding-top: 10px;
    margin-top: 10px;
    margin-bottom: 18px;
}

.summary-row.total .total-price {
    color: var(--line-green-dark);
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.2);
    transition: var(--transition);
}

.btn-checkout:hover {
    background-color: var(--line-green-dark);
}

.empty-cart-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.empty-cart-icon {
    width: 80px;
    height: 80px;
    color: var(--secondary);
    opacity: 0.3;
    margin-bottom: 20px;
}

/* Product Detail Modal */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: flex-end;
}

.modal-content {
    width: 100%;
    background-color: var(--bg-card);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-content::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background-color: #CBD5E1;
    border-radius: var(--radius-full);
    margin: 12px auto 4px auto;
    flex-shrink: 0;
}

.theme-event .modal-content::before {
    background-color: var(--accent);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-secondary);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
}

.btn-close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
}

.modal-body {
    overflow-y: auto;
    padding: 20px;
}

.detail-img-container {
    width: 100%;
    height: 200px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.detail-img {
    height: 85%;
    object-fit: contain;
}

.detail-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.detail-tag {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.detail-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--line-green-dark);
    margin-bottom: 16px;
}

.detail-desc-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.detail-desc {
    font-size: 13px;
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.detail-action-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid var(--bg-secondary);
    padding-top: 16px;
}

.btn-add-cart-large {
    flex: 1;
    padding: 14px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.15);
}

/* Profile Screen Components */
.profile-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px;
    border: 1px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(90deg, var(--line-green) 0%, var(--line-green-dark) 100%);
    z-index: 0;
}

.profile-avatar-wrapper {
    position: relative;
    width: 86px;
    height: 86px;
    margin: 10px auto 14px auto;
    z-index: 1;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.profile-badge-vip {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--warning);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    border: 2px solid white;
}

.profile-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.profile-id {
    font-size: 11px;
    color: var(--secondary);
    margin-bottom: 12px;
}

.profile-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    border-top: 1px solid var(--bg-secondary);
    padding-top: 14px;
}

.profile-meta-item {
    text-align: center;
}

.profile-meta-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.profile-meta-label {
    font-size: 11px;
    color: var(--secondary);
}

/* Membership Progress */
.tier-progress-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin: 0 20px 20px 20px;
    border: 1px solid var(--bg-secondary);
}

.tier-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-bar-bg {
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--line-green) 0%, var(--accent) 100%);
    width: 45%;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.tier-helper-text {
    font-size: 10px;
    color: var(--secondary);
}

/* Developer Console inside LIFF */
.dev-console-card {
    background-color: #1E293B;
    color: #38BDF8;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 0 20px 20px 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
}

.dev-console-title {
    color: white;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dev-console-logs {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    line-height: 1.4;
}

.log-time {
    color: #64748B;
    margin-right: 6px;
}

.log-api {
    color: #F472B6;
}

.log-success {
    color: #4ADE80;
}

.log-info {
    color: #E2E8F0;
}

.btn-simulation-panel {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin: 0 20px 20px 20px;
    border: 1px solid var(--bg-secondary);
}

.btn-simulation-panel h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sim-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.sim-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.btn-sim-action {
    padding: 8px 14px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-sim-logout {
    width: 100%;
    padding: 12px;
    background-color: var(--danger-light);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-sim-logout:hover {
    background-color: var(--danger);
    color: white;
}

/* Orders Screen Components */
.orders-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.order-header {
    background-color: var(--bg-secondary);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.order-id-label {
    font-weight: 600;
    color: var(--primary);
}

.order-date-label {
    color: var(--secondary);
}

.order-body {
    padding: 14px 16px;
}

.order-product-preview-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.order-item-mini-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    object-fit: contain;
    padding: 2px;
}

.order-item-summary-text {
    font-size: 12px;
    color: var(--secondary);
    flex: 1;
}

.order-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
}

.status-preparing {
    background-color: var(--accent-light);
    color: var(--accent);
}

.status-success {
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
}

.status-cancelled {
    background-color: var(--danger-light);
    color: var(--danger);
}

.order-total-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

/* Toast Notification */
.toast {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.toast-success-icon {
    width: 18px;
    height: 18px;
    fill: var(--line-green);
}

/* Checkout Modal Styling */
.checkout-modal-body {
    padding: 20px;
}

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

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 13px;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--line-green);
}

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.payment-option-card {
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.payment-option-card.active {
    border-color: var(--line-green);
    background-color: var(--line-green-light);
}

.payment-option-card svg {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
}

.payment-option-name {
    font-size: 10px;
    font-weight: 600;
}

/* Success View Animation */
.success-checkout-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.success-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--line-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-check-svg {
    width: 40px;
    height: 40px;
    fill: var(--line-green-dark);
}

.btn-back-to-shop {
    margin-top: 24px;
    padding: 10px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

/* Spinner Loader */
.loader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(6, 199, 85, 0.1);
    border-top: 3px solid var(--line-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Slip Upload Styling */
.btn-upload-slip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.btn-upload-slip:hover {
    background-color: var(--line-green-dark);
}

.slip-uploaded-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
    border: 1px solid var(--line-green);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    cursor: pointer;
}

.order-slip-section {
    margin-top: 8px;
}

/* Premium Subscription Card & Elements */
.premium-promo-card {
    background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
    color: white;
    padding: 22px;
    margin: 0 20px 20px 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.premium-promo-card::after {
    content: '👑';
    position: absolute;
    bottom: -15px;
    right: -10px;
    font-size: 80px;
    opacity: 0.12;
    transform: rotate(15deg);
}

.premium-promo-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-promo-subtitle {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.5;
}

.premium-perks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 12px 0;
    list-style: none;
    padding-left: 0;
}

.premium-perk-item {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.premium-perk-icon {
    font-size: 14px;
}

.premium-price-tag {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.premium-price-period {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
}

.btn-premium-subscribe {
    width: 100%;
    padding: 12px;
    background-color: white;
    color: #6D28D9;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-align: center;
}

.btn-premium-subscribe:hover {
    background-color: var(--bg-primary);
    transform: translateY(-1px);
}

.active-premium-card {
    background: linear-gradient(135deg, #1E1B4B 0%, #311042 100%);
    border: 2px solid #F59E0B;
    color: white;
    padding: 20px;
    margin: 0 20px 20px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.active-premium-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.active-premium-badge {
    background-color: #F59E0B;
    color: #1E1B4B;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.btn-premium-cancel {
    padding: 6px 12px;
    background-color: rgba(239, 68, 68, 0.2);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: 10px;
}

.btn-premium-cancel:hover {
    background-color: rgba(239, 68, 68, 0.35);
    color: white;
}

/* Order Status Badges Colors */
.status-pending-payment {
    background-color: #FEF3C7 !important;
    color: #D97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.status-verifying-payment {
    background-color: #EFF6FF !important;
    color: #1D4ED8 !important;
    border: 1px solid rgba(29, 78, 216, 0.2);
}

.status-preparing-items {
    background-color: #F5F3FF !important;
    color: #6D28D9 !important;
    border: 1px solid rgba(109, 40, 217, 0.2);
}

.status-scheduling {
    background-color: #ECFDF5 !important;
    color: #047857 !important;
    border: 1px solid rgba(4, 120, 87, 0.2);
}

/* Cute Status Animations & SVGs */
.cute-status-anim {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.anim-bob {
    animation: cute-bob 2.5s ease-in-out infinite;
}
@keyframes cute-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.anim-blink {
    animation: cute-blink 3.5s infinite;
    transform-origin: center;
}
@keyframes cute-blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.anim-coin {
    animation: cute-coin 1.8s ease-in infinite;
    transform-origin: center;
}
@keyframes cute-coin {
    0% { transform: translateY(-25px) scale(0.6); opacity: 0; }
    20% { opacity: 1; }
    70% { transform: translateY(12px) scale(1); opacity: 1; }
    80%, 100% { transform: translateY(15px) scale(0.8); opacity: 0; }
}

.anim-sway {
    animation: cute-sway 3s ease-in-out infinite;
    transform-origin: bottom center;
}
@keyframes cute-sway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3deg); }
}

.anim-scan {
    animation: cute-scan 2s ease-in-out infinite;
    transform-origin: center;
}
@keyframes cute-scan {
    0%, 100% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
}

.anim-magnify {
    animation: cute-magnify 4s ease-in-out infinite;
    transform-origin: 65px 65px;
}
@keyframes cute-magnify {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-5px, -5px); }
    50% { transform: translate(3px, -5px); }
    75% { transform: translate(-3px, 4px); }
}

.anim-bounce {
    animation: cute-bounce 1.6s ease-in-out infinite;
}
@keyframes cute-bounce {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(-6px) scaleY(0.95); }
}

.anim-wiggle-carrot {
    animation: cute-wiggle 1.2s ease-in-out infinite;
    transform-origin: 36px 42px;
}
.anim-wiggle-apple {
    animation: cute-wiggle 1.4s ease-in-out infinite alternate;
    transform-origin: 62px 36px;
}
@keyframes cute-wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.anim-drive {
    animation: cute-drive 0.6s linear infinite;
}
@keyframes cute-drive {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.anim-wheel {
    animation: cute-spin 0.8s linear infinite;
    transform-origin: center;
}
@keyframes cute-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.anim-exhaust {
    animation: cute-exhaust 1s ease-out infinite;
    transform-origin: center;
}
@keyframes cute-exhaust {
    0% { transform: translate(0, 0) scale(0.6); opacity: 1; }
    100% { transform: translate(-10px, -6px) scale(1.4); opacity: 0; }
}

.anim-pop {
    animation: cute-pop 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
    transform-origin: center bottom;
}
@keyframes cute-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.anim-heart {
    animation: cute-heart 1.5s ease-out infinite;
    transform-origin: center;
}
@keyframes cute-heart {
    0% { transform: translateY(5px) scale(0.4); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-15px) scale(1.1); opacity: 0; }
}

.anim-sparkle {
    animation: cute-sparkle 2s ease-in-out infinite;
    transform-origin: 50px 20px;
}
@keyframes cute-sparkle {
    0%, 100% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2) rotate(45deg); opacity: 1; }
}

/* Stepper/Tracker Styles */
.order-tracker-container {
    background-color: var(--bg-primary);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.order-stepper {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    padding-left: 10px;
    margin-top: 10px;
}
.order-stepper::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--bg-secondary);
    z-index: 1;
}
.stepper-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
}
.stepper-step:last-child {
    padding-bottom: 0;
}
.step-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #CBD5E1;
    border: 3px solid var(--bg-primary);
    position: relative;
    left: 0px;
    z-index: 2;
    transition: var(--transition);
}
.stepper-step.completed .step-circle {
    background-color: var(--line-green);
    border-color: var(--bg-primary);
}
.stepper-step.active .step-circle {
    background-color: var(--warning);
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}
.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.2;
}
.stepper-step.completed .step-title {
    color: var(--line-green-dark);
}
.stepper-step.active .step-title {
    color: var(--primary);
    font-weight: 700;
}
.step-desc {
    font-size: 11px;
    color: var(--secondary);
    line-height: 1.2;
}
.stepper-step.active .step-desc {
    color: var(--warning);
    font-weight: 500;
}

/* Event Cyberpunk Theme variables override */
.app-container.theme-event {
    --primary: #FFFFFF;
    --secondary: #A5B4FC;
    --bg-primary: #0F091F; /* Dark violet background */
    --bg-secondary: #2E1065; /* Dark purple container background */
    --bg-card: #1E1B4B; /* Deep purple card */
    --line-green: #F43F5E; /* Cyber Pink theme color */
    --line-green-dark: #E11D48;
    --line-green-light: #4C0519; /* Deep magenta accent background */
    --accent: #A855F7; /* Neon Violet */
    --accent-light: #3B0764; /* Deep purple borders */
    --warning: #FBBF24;
    --success: #10B981;
    border-color: #F43F5E !important;
    box-shadow: 0 0 50px rgba(244, 63, 94, 0.35);
}

/* Event specific styles */
.theme-event .brand-logo {
    background: linear-gradient(135deg, #F43F5E 0%, #A855F7 100%) !important;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.6);
}
.theme-event .brand-name {
    background: linear-gradient(135deg, #F43F5E 0%, #FBBF24 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
.theme-event .category-pill.active {
    background-color: var(--line-green) !important;
    color: white !important;
    border-color: var(--line-green) !important;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}
.theme-event .product-card {
    border-color: rgba(168, 85, 247, 0.2) !important;
}
.theme-event .product-card:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3) !important;
    border-color: var(--accent) !important;
}
.theme-event .product-price {
    color: #F43F5E !important;
}
.theme-event .btn-add-cart-mini {
    background-color: rgba(244, 63, 94, 0.15) !important;
    color: #F43F5E !important;
    border: 1px solid rgba(244, 63, 94, 0.3) !important;
}
.theme-event .btn-add-cart-mini:hover {
    background-color: #F43F5E !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}
.theme-event .hero-banner {
    background: linear-gradient(135deg, #311042 0%, #0F091F 100%) !important;
    border-bottom: 2px solid #F43F5E !important;
}
.theme-event .hero-banner::after {
    background: rgba(244, 63, 94, 0.2) !important;
}
.theme-event .bottom-nav {
    background-color: rgba(30, 27, 75, 0.9) !important;
    border-top-color: rgba(168, 85, 247, 0.2) !important;
}
.theme-event .nav-item.active {
    color: #F43F5E !important;
}
.theme-event .nav-item.active svg {
    stroke: #F43F5E !important;
    fill: rgba(244, 63, 94, 0.2) !important;
}
.theme-event .btn-checkout {
    background-color: #F43F5E !important;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}
.theme-event .btn-checkout:hover {
    background-color: #E11D48 !important;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.6);
}
.theme-event .search-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
}
.theme-event .search-input:focus {
    border-color: #F43F5E !important;
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}
.theme-event .product-card-mini-img {
    background-color: #110E3D !important;
}




