/**
 * LOTIPRO - Main Stylesheet
 * Venezuelan Lottery Platform
 * Dark Navy + Gold Theme
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Dark Theme Colors (Default) */
    --color-bg-primary: #0a1628;
    --color-bg-secondary: #0f2137;
    --color-bg-card: #162844;
    --color-bg-card-hover: #1e3a5f;

    --color-primary: #ffc107;
    --color-primary-hover: #ffca28;
    --color-primary-dark: #e6ac00;

    --color-secondary: #3b82f6;
    --color-secondary-hover: #60a5fa;

    --color-success: #22c55e;
    --color-success-bg: rgba(34, 197, 94, 0.1);
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-info: #3b82f6;
    --color-info-bg: rgba(59, 130, 246, 0.1);

    --color-text-primary: #ffffff;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;

    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-light: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Sizes */
    --header-height: 70px;
    --container-max: 1280px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 193, 7, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Light Theme - Premium Edition */
[data-theme="light"],
[data-theme="light"] body {
    /* Premium light backgrounds with subtle warmth */
    --color-bg-primary: #f0f4f8;
    --color-bg-secondary: #ffffff;
    --color-bg-card: #ffffff;
    --color-bg-card-hover: #e8eef4;

    /* High contrast text colors */
    --color-text-primary: #0a1628;
    --color-text-secondary: #374151;
    --color-text-muted: #4b5563;

    /* Primary accent - Rich gold for elegance */
    --color-primary: #b8860b;
    --color-primary-hover: #a67c00;
    --color-primary-dark: #8b6914;

    /* Defined borders for clarity */
    --color-border: rgba(15, 23, 42, 0.15);
    --color-border-light: rgba(15, 23, 42, 0.08);

    /* Premium shadows with depth */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 25px 50px rgba(15, 23, 42, 0.18);
    --shadow-glow: 0 0 20px rgba(184, 134, 11, 0.2);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.theme-toggle-btn:hover {
    background: var(--color-primary);
    color: var(--color-bg-primary);
    transform: scale(1.1);
}

.theme-toggle-btn i {
    transition: transform 0.3s ease, opacity 0.2s ease;
    position: absolute;
}

.theme-toggle-btn:hover i {
    transform: rotate(20deg);
}

/* Theme icon visibility - In dark mode show sun, in light mode show moon */
.theme-toggle-btn #themeIconSun {
    display: block;
}

.theme-toggle-btn #themeIconMoon {
    display: none;
}

[data-theme="light"] .theme-toggle-btn #themeIconSun {
    display: none;
}

[data-theme="light"] .theme-toggle-btn #themeIconMoon {
    display: block;
}

/* ============================================
   SMOOTH THEME TRANSITIONS
   ============================================ */
body,
.header,
.main,
.footer,
.card,
.nav-link,
.btn,
.user-menu-dropdown,
.mobile-nav {
    transition: background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

/* Light mode specific adjustments - Premium Edition */
[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .card-footer {
    background: rgba(15, 23, 42, 0.03);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* Premium light mode cards */
[data-theme="light"] .card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.1);
    border-color: rgba(184, 134, 11, 0.3);
}

/* Navigation links in light mode */
[data-theme="light"] .nav-link {
    color: #374151;
}

[data-theme="light"] .nav-link:hover {
    color: #0a1628;
    background: rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .nav-link.active {
    color: #b8860b;
}

/* User menu dropdown in light mode */
[data-theme="light"] .user-menu-dropdown {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .user-menu-header {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.08), rgba(184, 134, 11, 0.02));
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .user-menu-item:hover {
    background: rgba(15, 23, 42, 0.05);
}

/* Buttons in light mode */
[data-theme="light"] .btn-auth {
    color: #0891b2;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(34, 211, 238, 0.06) 100%);
    border-color: rgba(6, 182, 212, 0.35);
}

[data-theme="light"] .btn-auth:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    border-color: #0891b2;
}

/* CTA Button premium styling */
[data-theme="light"] .btn-cta {
    background: linear-gradient(135deg, #b8860b 0%, #a67c00 100%);
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

[data-theme="light"] .btn-cta:hover {
    background: linear-gradient(135deg, #d4a106 0%, #b8860b 100%);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

/* Mobile navigation in light mode */
[data-theme="light"] .mobile-nav {
    background: #ffffff;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .mobile-nav-item {
    color: #4b5563;
}

[data-theme="light"] .mobile-nav-item.active {
    color: #b8860b;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-text-secondary) !important;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.text-success {
    color: var(--color-success) !important;
}

.text-error,
.text-danger {
    color: var(--color-error) !important;
}

.text-warning {
    color: var(--color-warning) !important;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.main {
    min-height: calc(100vh - var(--header-height) - 400px);
    padding-top: var(--header-height);
}

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid System */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1024px) {

    .grid-4,
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   HEADER - Professional App-Style
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header>.container {
    height: 100%;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
    line-height: 1;
}

.logo-img {
    height: 38px;
    width: auto;
    transition: transform var(--transition-fast);
    display: block;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: transform var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-card);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    color: var(--color-primary);
}

.nav-link i {
    font-size: 0.95rem;
    transition: transform var(--transition-fast);
}

.nav-link:hover i {
    transform: scale(1.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.theme-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.theme-switch input:checked+.theme-slider {
    background: linear-gradient(135deg, #87ceeb, #b0e0e6);
}

.theme-switch input:checked+.theme-slider::before {
    transform: translateX(27px);
    background: linear-gradient(135deg, #fff, #f0f0f0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-icon-dark,
.theme-icon-light {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: opacity 0.3s ease;
}

.theme-icon-dark {
    left: 8px;
    color: #b8c5d6;
}

.theme-icon-light {
    right: 8px;
    color: #ff9800;
    opacity: 0;
}

.theme-switch input:checked+.theme-slider .theme-icon-dark {
    opacity: 0;
}

.theme-switch input:checked+.theme-slider .theme-icon-light {
    opacity: 1;
}

/* Auth Button - Premium Cyan Style */
.btn-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(34, 211, 238, 0.1) 100%);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: none;
    letter-spacing: 0.3px;
}

.btn-auth:hover {
    color: #fff;
    border-color: #06b6d4;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(34, 211, 238, 0.2) 100%);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
    transform: translateY(-1px);
}

[data-theme="light"] .btn-auth {
    color: #0891b2;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(34, 211, 238, 0.05) 100%);
    border-color: rgba(6, 182, 212, 0.3);
}

[data-theme="light"] .btn-auth:hover {
    color: #0e7490;
    border-color: #0891b2;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(34, 211, 238, 0.15) 100%);
}

.btn-auth i {
    font-size: 0.85rem;
}

/* CTA Button - Premium Yellow (Header) */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 4px 0;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #000;
    border: none;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.25);
    white-space: nowrap;
    line-height: 1.2;
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #ffca28 0%, #ffc107 100%);
    color: #000;
}

.btn-cta i {
    font-size: 0.8rem;
}

/* User Menu - Modern Style */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border-radius: 50px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu-toggle:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-primary);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #ff9800);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-heading);
}

.chevron-icon {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    transition: transform var(--transition-fast);
}

.user-menu.active .chevron-icon {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 280px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 1100;
}

[data-theme="light"] .user-menu-dropdown {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.user-menu.active .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.05));
    border-bottom: 1px solid var(--color-border);
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #ff9800);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    font-family: var(--font-heading);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-body {
    padding: 8px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--color-text-secondary);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.user-menu-item:hover {
    background: var(--color-bg-card-hover);
    color: var(--color-text-primary);
}

.user-menu-item i {
    width: 18px;
    font-size: 0.95rem;
    text-align: center;
}

.user-menu-item.admin-link {
    color: var(--color-primary);
}

.user-menu-item.admin-link:hover {
    background: rgba(255, 193, 7, 0.1);
}

.user-menu-divider {
    height: 1px;
    background: var(--color-border);
    margin: 6px 14px;
}

.user-menu-footer {
    padding: 8px;
    border-top: 1px solid var(--color-border);
}

.user-menu-item.logout-link {
    color: var(--color-error);
}

.user-menu-item.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Mobile Header Actions */
.mobile-header-actions {
    display: none;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Mobile CTA Button - "Comprar Terminal" */
.btn-mobile-cta {
    display: none;
    /* Hidden by default on desktop */
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1px;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
    flex-shrink: 0;

    /* Absolute Positioning for Centering */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.btn-mobile-cta i {
    font-size: 0.6rem;
}

.btn-mobile-cta:hover,
.btn-mobile-cta:active {
    background: linear-gradient(135deg, #ffca28 0%, #ffc107 100%);
    box-shadow: 0 3px 12px rgba(255, 193, 7, 0.35);
    color: #000;
    transform: translateX(-50%) translateY(-1px);
}

/* Mobile Login Button - "Ingresar" */
.btn-mobile-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(34, 211, 238, 0.1) 100%);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.45);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.1px;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-mobile-login i {
    font-size: 0.72rem;
}

.btn-mobile-login:hover,
.btn-mobile-login:active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.28) 0%, rgba(34, 211, 238, 0.2) 100%);
    border-color: #06b6d4;
    color: #fff;
    transform: translateY(-1px);
}

[data-theme="light"] .btn-mobile-login {
    color: #0891b2;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(34, 211, 238, 0.06) 100%);
    border-color: rgba(6, 182, 212, 0.4);
}

[data-theme="light"] .btn-mobile-login:hover {
    color: #0e7490;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18) 0%, rgba(34, 211, 238, 0.12) 100%);
}

/* Legacy btn-mobile-auth (fallback) */
.btn-mobile-auth {
    display: none;
}

.mobile-user-menu .user-menu-toggle {
    padding: 6px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.mobile-user-menu .chevron-icon {
    display: none;
}

/* Mobile user menu dropdown - ensure proper positioning */
.mobile-user-menu .user-menu-dropdown {
    position: fixed;
    top: 60px;
    right: 10px;
    left: auto;
    min-width: 260px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 1100;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION (App-Style)
   ============================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    z-index: 1000;
}

[data-theme="light"] .mobile-bottom-nav {
    background: #ffffff;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 6px 4px 8px;
    min-height: 52px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: all var(--transition-fast);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}

.mobile-bottom-nav-item i {
    font-size: 28px;
    transition: all var(--transition-fast);
}

.mobile-bottom-nav-item span {
    transition: all var(--transition-fast);
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item.active {
    color: var(--color-primary);
}

.mobile-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 32px;
    background: rgba(255, 193, 7, 0.15);
    border-radius: 16px;
    z-index: -1;
}

.mobile-bottom-nav-item.active i {
    transform: scale(1.1);
}

/* ============================================
   MOBILE MORE MENU (Slide-up Panel)
   ============================================ */
.mobile-more-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
}

.mobile-more-menu.active {
    display: block;
}

.mobile-more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-more-menu.active .mobile-more-overlay {
    opacity: 1;
}

.mobile-more-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-secondary);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow-y: auto;
}

[data-theme="light"] .mobile-more-panel {
    background: #ffffff;
}

.mobile-more-menu.active .mobile-more-panel {
    transform: translateY(0);
}

.mobile-more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.mobile-more-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.mobile-more-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-bg-card);
    border: none;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-more-close:hover {
    background: var(--color-bg-card-hover);
    color: var(--color-text-primary);
}

.mobile-more-content {
    padding: 12px;
}

.mobile-more-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    color: var(--color-text-primary);
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-fast);
}

.mobile-more-item:hover {
    background: var(--color-bg-card);
}

.mobile-more-item i {
    width: 24px;
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    text-align: center;
}

.mobile-more-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

.mobile-more-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 16px;
}

/* Theme Toggle Row in More Menu */
.theme-toggle-row {
    justify-content: space-between;
}

.theme-toggle-label {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-switch-mobile {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.theme-switch-mobile input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider-mobile {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.theme-slider-mobile::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background: var(--color-text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-switch-mobile input:checked+.theme-slider-mobile {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.theme-switch-mobile input:checked+.theme-slider-mobile::before {
    transform: translateX(21px);
    background: #000;
}

/* ============================================
   MOBILE BOTTOM NAV V2 - New Design
   ============================================ */
.mobile-bottom-nav-v2 {
    padding-top: 12px;
    /* Extra space for elevated buy button */
}

/* Mini Avatar for Nav */
.nav-avatar-mini {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #ff9800);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-fallback-mini {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Central Buy Button (Elevated Circle) */
.nav-buy-btn {
    position: relative !important;
    flex: 1.3 !important;
}

.nav-buy-circle {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--buy-bg, #ffc107);
    color: var(--buy-text, #0a1628);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.4), 0 0 0 4px var(--color-bg-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-buy-circle i {
    font-size: 22px;
    color: inherit !important;
}

.nav-buy-btn:hover .nav-buy-circle,
.nav-buy-btn:active .nav-buy-circle {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 6px 28px rgba(255, 193, 7, 0.5), 0 0 0 4px var(--color-bg-secondary);
}

.nav-buy-btn span {
    margin-top: 28px;
    color: var(--color-primary);
    font-weight: 600;
}

/* Logout item in More menu */
.mobile-more-item.logout-item {
    color: var(--color-error);
}

.mobile-more-item.logout-item i {
    color: var(--color-error);
}

.mobile-more-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   WHATSAPP MINI MODAL
   ============================================ */
.whatsapp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    justify-content: center;
    align-items: flex-end;
    padding: 80px 16px;
}

.whatsapp-modal-overlay.active {
    display: flex;
}

.whatsapp-modal {
    background: #075e54;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-modal-overlay.active .whatsapp-modal {
    transform: translateY(0);
}

.whatsapp-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #128c7e;
    color: #fff;
}

.whatsapp-modal-header>i {
    font-size: 24px;
}

.whatsapp-modal-title {
    flex: 1;
}

.whatsapp-modal-title strong {
    font-size: 1rem;
    display: block;
}

.whatsapp-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.whatsapp-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.whatsapp-modal-body {
    background: var(--color-bg-card);
    padding: 12px;
}

.whatsapp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--color-bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.whatsapp-option:last-child {
    margin-bottom: 0;
}

.whatsapp-option:hover {
    background: var(--color-bg-card-hover);
    transform: translateX(4px);
}

.whatsapp-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.whatsapp-option-icon.community {
    background: linear-gradient(135deg, #25D366, #128c7e);
    color: #fff;
}

.whatsapp-option-icon.support {
    background: #25D366;
    color: #fff;
}

.whatsapp-option-icon i {
    font-size: 20px;
}

.whatsapp-option-text {
    flex: 1;
}

.whatsapp-option-text strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.whatsapp-option-text span {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.whatsapp-option>i.fa-chevron-right {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}



/* ============================================
   RESPONSIVE - Header
   ============================================ */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }

    .header-actions .btn-auth {
        display: none;
    }

    .header-actions .btn-cta span {
        display: none;
    }

    .header-actions .btn-cta {
        padding: 10px 14px;
    }

    .mobile-header-actions {
        display: flex;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .header {
        height: 56px;
    }

    .header>.container {
        padding: 0 16px;
    }

    .header-content {
        gap: 12px;
        position: relative;
    }

    .header-actions {
        display: none;
    }

    .btn-mobile-cta {
        display: inline-flex;
    }

    .mobile-header-actions {
        display: flex;
        gap: 8px;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .logo-img {
        height: 28px;
    }

    .main {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .footer {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .header>.container {
        padding: 0 12px;
    }

    .header-content {
        gap: 8px;
    }

    .logo-img {
        height: 24px;
    }

    .btn-mobile-cta {
        padding: 5px 10px;
        font-size: 0.55rem;
    }

    .btn-mobile-cta i {
        font-size: 0.55rem;
    }

    .btn-mobile-login {
        padding: 6px 12px;
        font-size: 0.72rem;
    }

    .btn-mobile-login i {
        font-size: 0.72rem;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-bg-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--color-bg-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-bg-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--color-bg-card);
    color: var(--color-text-primary);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-text-primary);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background: var(--color-secondary-hover);
    border-color: var(--color-secondary-hover);
}

.btn-success {
    background: var(--color-success);
    color: var(--color-text-primary);
    border-color: var(--color-success);
}

.btn-danger {
    background: var(--color-error);
    color: var(--color-text-primary);
    border-color: var(--color-error);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-block {
    width: 100%;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text-primary);
}

.card-text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.2);
}

/* Lottery Card */
.lottery-card {
    position: relative;
}

.lottery-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background: var(--color-primary);
    color: var(--color-bg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.lottery-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.lottery-card-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.lottery-card-info-item i {
    color: var(--color-primary);
    width: 16px;
}

.lottery-card-info-item strong {
    color: var(--color-text-primary);
}

.lottery-card-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--color-border);
}

.lottery-card-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.lottery-card-price-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.form-label.required::after {
    content: '*';
    color: var(--color-error);
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-error {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-help {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-checkbox input,
.form-radio input {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
}

/* ============================================
   ALERTS
   ============================================ */
.flash-messages {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.alert-warning {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning);
    color: var(--color-warning);
}

.alert-info {
    background: var(--color-info-bg);
    border: 1px solid var(--color-info);
    color: var(--color-info);
}

.alert-close {
    margin-left: auto;
    font-size: 1.25rem;
    color: inherit;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    display: inline-block;
    margin-bottom: 15px;
}

.footer-logo img {
    height: 40px;
}

.footer-about {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-title {
    color: var(--color-text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-links span {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-links i {
    width: 16px;
    margin-top: 3px;
    color: var(--color-primary);
}

/* Social Links */
.footer-social {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.footer-social h4 {
    color: var(--color-text-primary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--color-text-primary);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    transform: translateY(-3px);
    color: var(--color-bg-primary);
}

.social-icon.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #e6683c;
}

.social-icon.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-icon.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.social-icon.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.social-icon.telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
}

/* Footer Bottom */
.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--color-primary);
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex {
    display: flex !important;
}

.inline-flex {
    display: inline-flex !important;
}

.items-center {
    align-items: center !important;
}

.justify-center {
    justify-content: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.gap-1 {
    gap: 5px !important;
}

.gap-2 {
    gap: 10px !important;
}

.gap-3 {
    gap: 15px !important;
}

.gap-4 {
    gap: 20px !important;
}

.mt-1 {
    margin-top: 5px !important;
}

.mt-2 {
    margin-top: 10px !important;
}

.mt-3 {
    margin-top: 15px !important;
}

.mt-4 {
    margin-top: 20px !important;
}

.mb-1 {
    margin-bottom: 5px !important;
}

.mb-2 {
    margin-bottom: 10px !important;
}

.mb-3 {
    margin-bottom: 15px !important;
}

.mb-4 {
    margin-bottom: 20px !important;
}

.p-1 {
    padding: 5px !important;
}

.p-2 {
    padding: 10px !important;
}

.p-3 {
    padding: 15px !important;
}

.p-4 {
    padding: 20px !important;
}

.w-full {
    width: 100% !important;
}

.h-full {
    height: 100% !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.rounded-lg {
    border-radius: var(--border-radius-lg) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.bg-card {
    background: var(--color-bg-card) !important;
}

.bg-primary {
    background: var(--color-primary) !important;
}

.border {
    border: 1px solid var(--color-border) !important;
}

.border-primary {
    border-color: var(--color-primary) !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@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 shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease;
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--color-bg-card) 25%, var(--color-bg-card-hover) 50%, var(--color-bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .section {
        padding: 40px 0;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
}

/* ============================================
   RESPONSIVE FIXES (HORIZONTAL SCROLL)
   ============================================ */

/* 1. Fix Smart Cart Overflow */
@media (max-width: 768px) {

    .smart-cart__embedded-content,
    .smart-cart__embedded-summary,
    .smart-cart__embedded-actions {
        display: flex;
        flex-wrap: wrap !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .smart-cart__embedded-summary>div {
        width: 100%;
        margin-bottom: 5px;
    }

    .smart-cart {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* 2. Fix Footer Text Overflow */
.footer-bottom p,
.footer-bottom .copyright-text {
    white-space: normal !important;
    word-break: break-word;
    max-width: 100%;
}

.footer-bottom {
    flex-wrap: wrap;
}

/* 3. Fix Results Table Overflow */
.landing-results-grid,
.llc-results-container {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.llc-results-table {
    min-width: 100%;
    /* Allow shrinking */
    width: auto;
}

/* 4. Auth Modal Fix */
.auth-modal {
    max-width: 90vw;
}

@media (max-width: 480px) {
    .auth-modal {
        width: 95vw;
        margin: 10px;
    }
}

/* 5. General Overflow Safety */
body,
html {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

.main {
    width: 100%;
    overflow-x: hidden;
}

/* Force Boxed Layout on Desktop */
@media (min-width: 992px) {
    .container {
        max-width: 1280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* .container fix moved to media query below to prevent desktop full-width issue */

/* 6. Reduce Hero Spacing on Mobile */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    section.hero {
        padding-top: 25px !important;
        padding-bottom: 40px !important;
        min-height: auto !important;
    }
}

/* 7. Fix Hero Video Overflow & Button */
.video-thumbnail-img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

.hero-mobile-video,
.hero-video-frame-mobile {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden;
}

@media (max-width: 768px) {

    section.hero,
    .hero-cta,
    .hero-content {
        max-width: 100vw !important;
        overflow-x: hidden;
        /* Ensure padding exists but doesn't force width > 100% if box-sizing isn't border-box */
        box-sizing: border-box;
    }

    /* Fix overflowing CTA button */
    .hero-cta .btn {
        max-width: 100%;
        white-space: normal;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.3;
        padding: 14px 20px;
        height: auto;
    }

    /* Fix Testimonial/Promo Card Overflow */
    .testimonial-cta {
        max-width: 100% !important;
        width: auto !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
        padding: 20px 15px !important;
        box-sizing: border-box;
    }

    .testimonial-cta-btn {
        white-space: normal !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}