/**
 * 麦当劳优惠券助手 - 主样式表
 * 设计风格：现代、高级感、麦当劳品牌色
 */

/* ============================================
   CSS Variables - 设计系统
   ============================================ */
:root {
    /* 品牌色 */
    --mcd-red: #DA291C;
    --mcd-red-dark: #B8231A;
    --mcd-red-light: #FF3B30;
    --mcd-yellow: #FFC72C;
    --mcd-yellow-dark: #E5B000;
    --mcd-yellow-light: #FFD54F;
    --mcd-gold: #D4A574;

    /* 布局变量 */
    --bottom-nav-height: 80px;

    /* 中性色 */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* 功能色 */
    --success: #4CAF50;
    --success-light: #81C784;
    --warning: #FF9800;
    --warning-light: #FFB74D;
    --error: #F44336;
    --error-light: #E57373;
    --info: #2196F3;
    --info-light: #64B5F6;

    /* 背景色 */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F0F2F5;
    --bg-dark: #1A1A2E;
    --bg-dark-secondary: #16213E;

    /* 文字色 */
    --text-primary: #1A1A2E;
    --text-secondary: #5B5B6A;
    --text-tertiary: #8E8E9C;
    --text-inverse: #FFFFFF;

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #DA291C 0%, #FF6B4A 100%);
    --gradient-secondary: linear-gradient(135deg, #FFC72C 0%, #FFE066 100%);
    --gradient-gold: linear-gradient(135deg, #D4A574 0%, #E8C8A0 50%, #D4A574 100%);
    --gradient-dark: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow-red: 0 0 40px rgba(218, 41, 28, 0.3);
    --shadow-glow-yellow: 0 0 40px rgba(255, 199, 44, 0.3);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* 间距 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* 字体 */
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    --font-size-4xl: 36px;

    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 层级 */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-splash: 500;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a {
    color: var(--mcd-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--mcd-red-dark);
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

input {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* ============================================
   App Container
   ============================================ */
#app {
    min-height: 100vh;
    position: relative;
}

.screen {
    min-height: 100vh;
}

/* ============================================
   Splash Screen
   ============================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-splash);
    animation: splashFadeOut 0.5s ease 2s forwards;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-6);
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-2xl);
    animation: splashLogoEntry 0.6s var(--transition-spring);
}

.splash-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.splash-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-8);
    animation: splashTextEntry 0.6s ease 0.2s backwards;
}

.splash-loader {
    animation: splashTextEntry 0.6s ease 0.4s backwards;
}

.loader-dots {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: loaderBounce 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.16s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes splashLogoEntry {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes splashTextEntry {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splashFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes loaderBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Login Screen
   ============================================ */
.login-screen {
    position: relative;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-6);
    overflow: hidden;
}

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--mcd-yellow);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.circle-2 {
    width: 250px;
    height: 250px;
    background: var(--mcd-red);
    bottom: 10%;
    left: -80px;
    animation: float 6s ease-in-out infinite reverse;
}

.circle-3 {
    width: 180px;
    height: 180px;
    background: var(--mcd-yellow-light);
    bottom: 30%;
    right: 10%;
    animation: float 7s ease-in-out infinite 1s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, 20px) scale(1.05);
    }
}

.login-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
}

.login-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.login-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.login-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: var(--space-4);
    padding-right: 50px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    background: var(--bg-primary);
    border-color: var(--mcd-red);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.toggle-password {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    padding: var(--space-2);
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.form-hint {
    margin-top: var(--space-2);
    text-align: right;
}

.form-hint a {
    font-size: var(--font-size-sm);
    color: var(--mcd-red);
}

.login-footer {
    text-align: center;
    margin-top: var(--space-6);
}

.login-footer p {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

.login-footer a {
    color: var(--mcd-red);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), var(--shadow-glow-red);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(218, 41, 28, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--gray-300);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: var(--error-light);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-xl);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   Main App Screen
   ============================================ */
.main-screen {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    padding-bottom: 80px;
}

/* App Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    max-width: 600px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-logo {
    width: 36px;
    height: 36px;
}

.header-title {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* App Main Content */
.app-main {
    flex: 1;
    padding: var(--space-4);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 199, 44, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Quick Actions Card */
.quick-actions-card {
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.quick-actions-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.quick-actions-header h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.badge {
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.badge-gold {
    background: var(--gradient-gold);
    color: #4A3728;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-5) var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-spring);
    position: relative;
    overflow: hidden;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.action-btn.primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow-red);
}

.action-btn.secondary {
    background: var(--gradient-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.action-btn.secondary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow-yellow);
}

.action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
}

.action-icon svg {
    width: 24px;
    height: 24px;
}

.action-text {
    font-weight: 600;
    font-size: var(--font-size-base);
    margin-bottom: var(--space-1);
}

.action-desc {
    font-size: var(--font-size-xs);
    opacity: 0.8;
}

/* Stats Section */
.stats-section {
    margin-bottom: var(--space-5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(218, 41, 28, 0.1);
    color: var(--mcd-red);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2);
}

.stat-icon.owned {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.stat-icon.savings {
    background: rgba(255, 199, 44, 0.2);
    color: var(--mcd-yellow-dark);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

/* Coupons Section */
.coupons-section {
    margin-bottom: var(--space-5);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.section-header h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.view-all-btn {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--mcd-red);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.view-all-btn svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.view-all-btn:hover svg {
    transform: translateX(4px);
}

.coupons-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Coupon Card */
.coupon-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    transition: all var(--transition-fast);
    position: relative;
}

.coupon-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.coupon-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
}

.coupon-card.claimed::before {
    background: var(--success);
}

.coupon-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.coupon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coupon-info {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.coupon-title {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coupon-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coupon-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

.coupon-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.coupon-price .currency {
    font-size: var(--font-size-sm);
    color: var(--mcd-red);
}

.coupon-price .amount {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--mcd-red);
}

.coupon-expiry {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.coupon-action {
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
}

.claim-btn {
    padding: var(--space-2) var(--space-4);
    background: var(--gradient-primary);
    color: white;
    font-weight: 500;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.claim-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.claim-btn.claimed {
    background: var(--success);
    pointer-events: none;
}

/* Loading Placeholder */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.skeleton-card {
    height: 100px;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-lg);
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    padding: var(--space-2) 0;
    padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
    z-index: var(--z-sticky);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
    border-radius: var(--radius-lg);
}

.nav-item:hover {
    color: var(--text-secondary);
}

.nav-item.active {
    color: var(--mcd-red);
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item span {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* ============================================
   Modal
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s var(--transition-spring);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: var(--space-5);
    overflow-y: auto;
    max-height: calc(90vh - 70px);
}

/* Settings List */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.settings-group h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--gray-100);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item span {
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

/* Switch Toggle */
.switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.switch input:checked+.slider {
    background: var(--mcd-red);
}

.switch input:checked+.slider::before {
    transform: translateX(22px);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: calc(100% - 32px);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--bg-dark);
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-xl);
    animation: toastSlideIn 0.3s var(--transition-spring);
    pointer-events: auto;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

.toast.warning {
    background: var(--warning);
    color: var(--text-primary);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.toast-close:hover {
    opacity: 1;
}

.toast.exiting {
    animation: toastSlideOut 0.2s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (min-width: 768px) {
    .login-screen {
        padding: var(--space-10);
    }

    .login-form {
        padding: var(--space-8);
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        border-radius: var(--radius-xl);
        margin: var(--space-4);
        max-height: calc(100vh - 32px);
    }

    .modal {
        align-items: center;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1A1A2E;
        --bg-secondary: #16213E;
        --bg-tertiary: #0F3460;
        --text-primary: #FFFFFF;
        --text-secondary: #B8B8C8;
        --text-tertiary: #6B6B7B;
    }

    .glass-card,
    .login-form {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .coupon-card,
    .stat-card {
        background: var(--bg-tertiary);
    }

    .app-header,
    .bottom-nav {
        background: rgba(26, 26, 46, 0.9);
    }

    .modal-content {
        background: var(--bg-secondary);
    }

    .input-wrapper input {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    .input-wrapper input:focus {
        background: var(--bg-primary);
    }
}

/* Safe Area for iOS */
@supports (padding: max(0px)) {
    .app-header {
        padding-top: max(var(--space-3), env(safe-area-inset-top));
    }

    .bottom-nav {
        padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
    }
}

/* Print Styles */
@media print {

    .bottom-nav,
    .app-header,
    .splash-screen,
    .modal {
        display: none !important;
    }


    .main-screen {
        padding-bottom: 0;
    }
}

/* PWA Install Banner */
.install-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    z-index: 10000;
    animation: slideUp 0.3s ease forwards;
}

.install-banner.hidden {
    display: none;
}

.install-icon img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.install-info {
    flex: 1;
}

.install-title {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.install-desc {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.install-btn {
    background: var(--mcd-yellow);
    color: var(--text-primary);
    border-radius: var(--radius-full);
    padding: 6px 16px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
}

.close-install-btn {
    padding: 4px;
    color: var(--text-tertiary);
}

.close-install-btn svg {
    width: 18px;
    height: 18px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}