/* Happy & Clean Light Glassmorphic UI Theme */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Cabinet+Grotesk:wght@800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-solid: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-hover: rgba(99, 102, 241, 0.25);
    
    --primary: #4f46e5; /* Happy Indigo */
    --primary-glow: rgba(99, 102, 241, 0.08);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    
    --secondary: #0d9488; /* Fresh Teal */
    --secondary-gradient: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    
    --accent: #e11d48; /* Cheerful Rose/Coral */
    --accent-gradient: linear-gradient(135deg, #fda4af 0%, #f43f5e 50%, #e11d48 100%);
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --text-main: #0f172a; /* Deep Slate */
    --text-muted: #475569; /* Soft Slate */
    --text-dark: #64748b;
    
    --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    
    --font-heading: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 10px;
    --box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    letter-spacing: -0.01em;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(20, 184, 166, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.03) 0%, transparent 50%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.04em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-secondary {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Happy Light Card container */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--border-radius-lg);
    padding: 36px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--glass-gradient);
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}
.glass-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

/* Interactive Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
}
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(20, 184, 166, 0.35);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
}

.btn-danger {
    background: var(--accent-gradient);
    color: #ffffff;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Forms and inputs */
.form-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
    background: #ffffff;
}

/* Header & Navigation bar */
header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.45rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.04em;
    font-family: var(--font-heading);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* VIP Member Credit Cards (Light Theme Gold/Platinum) */
.vip-card-wrap {
    perspective: 1000px;
    width: 320px;
    height: 190px;
    margin: 10px 0 20px 0;
}

.vip-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    position: relative;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

.vip-card-Bronze {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}
.vip-card-Silver {
    background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
}
.vip-card-Gold {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}
.vip-card-Platinum {
    background: linear-gradient(135deg, #6366f1 0%, #3730a3 100%);
}

.vip-card-inner::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 45%, rgba(255,255,255,0.15) 50%, transparent 55%);
    transform: rotate(30deg);
    pointer-events: none;
}

.vip-card-chip {
    width: 38px;
    height: 28px;
    background: linear-gradient(135deg, #ffe082 0%, #ffb300 100%);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
}

/* Custom Table Flex lists (No raw tables) */
.custom-table-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.custom-table-row {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}
.custom-table-row:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.05);
    background: #ffffff;
}

.custom-table-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.col-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.col-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Dashboard Sidebar links */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    margin-top: 40px;
    margin-bottom: 60px;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.04);
    color: var(--primary);
}
.sidebar-link.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.1);
}

/* Stats metrics widget counters */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.stat-value {
    font-size: 1.65rem;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-top: 6px;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Home search form */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 0 60px 0;
}
.hero-title {
    font-size: 3.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-main);
}
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 36px;
}

.url-input-wrapper {
    display: flex;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 6px;
    border-radius: 50px;
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.url-input-wrapper input {
    background: transparent;
    border: none;
    flex: 1;
    color: var(--text-main);
    padding-left: 20px;
    font-size: 0.95rem;
}
.url-input-wrapper button {
    padding: 10px 24px;
    border-radius: 50px;
}

/* Banners & Flash alerts */
.flash-message {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.flash-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Chat Widget */
.chat-container {
    height: 480px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 60%;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.9rem;
}
.chat-bubble.user {
    align-self: flex-end;
    background: var(--primary-gradient);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}
.chat-bubble.admin {
    align-self: flex-start;
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #f8fafc;
    display: flex;
    gap: 12px;
}

/* Fortune Wheel elements */
.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 30px auto;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 28px solid var(--accent);
    z-index: 10;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #ffffff;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
    overflow: hidden;
    position: relative;
    transition: transform 5s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Milestone Timelines */
.milestone-row {
    position: relative;
    padding-left: 36px;
    margin-bottom: 24px;
}
.milestone-row::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: -24px;
    width: 2px;
    background: rgba(0, 0, 0, 0.05);
}
.milestone-row:last-child::before {
    display: none;
}
.milestone-dot {
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    z-index: 2;
}
.milestone-dot.active {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}
.milestone-content {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

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

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Media Queries
   ========================================================================== */

/* Tablet & Mobile Layouts (Screens <= 992px) */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Landscape Phones & Small Tablets (Screens <= 768px) */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        height: auto;
        padding: 12px 16px;
        gap: 12px;
    }
    .nav-links {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 8px;
        justify-content: flex-start;
        gap: 16px;
        -webkit-overflow-scrolling: touch;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    
    .hero-section {
        padding: 60px 0 30px 0;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    
    .analyzed-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Portrait Phones (Screens <= 600px) */
@media (max-width: 600px) {
    .glass-card {
        padding: 20px;
        border-radius: var(--border-radius-md);
    }
    
    .custom-table-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    .custom-table-col {
        width: 100%;
    }
    .custom-table-col[style*="align-items: flex-end"],
    .custom-table-col[style*="align-items:flex-end"] {
        align-items: flex-start !important;
    }
    
    .product-item {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }
    .product-image {
        width: 100px;
        height: 100px;
    }
    
    .chat-bubble {
        max-width: 85%;
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .url-input-wrapper {
        flex-direction: column;
        border-radius: 16px;
        padding: 8px;
        gap: 8px;
    }
    .url-input-wrapper input {
        padding: 8px;
        text-align: center;
    }
    .url-input-wrapper button {
        width: 100%;
        border-radius: 10px;
    }
    
    .steps-wrapper {
        grid-template-columns: 1fr;
    }
    .step-item {
        padding: 24px;
    }
}

/* Very Narrow Devices (Screens <= 380px) */
@media (max-width: 380px) {
    .vip-card-wrap {
        width: 100%;
        max-width: 280px;
        height: 165px;
        margin: 10px auto;
    }
    .vip-card-inner {
        padding: 16px;
    }
    .wheel-container {
        width: 220px;
        height: 220px;
    }
}

