/* ============================================================================
   TOOLLGATE - Fast Toll Payment System
   Copyright (c) 2026 Thando Hlomuka. All Rights Reserved.
   
   This code is protected under proprietary license.
   Unauthorized copying, distribution, modification, or use is strictly prohibited.
   See LICENSE file for full terms.
   Contact: thandohlomuka8@gmail.com
   
   WARNING: Any unauthorized modification of this code is a violation of copyright law.
   Only Thando Hlomuka is authorized to edit this code repository.
   ========================================================================== */

/* ==================== ROOT VARIABLES ==================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==================== ONBOARDING ==================== */
.onboarding-container {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    overflow: hidden;
}

.onboarding-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.onboarding-slides {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    position: absolute;
    width: 100%;
    max-width: 500px;
    text-align: center;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.slide-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.slide-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.slide-description {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.8;
}

.slide-indicators {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 3rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: var(--primary);
    width: 30px;
    border-radius: 10px;
}

.get-started-btn {
    margin-top: 2rem;
    padding: 1.2rem 3rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.get-started-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.5);
}

.onboarding-nav {
    display: flex;
    justify-content: space-between;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

/* ==================== MAIN APP ==================== */
.main-app {
    min-height: 100vh;
    background: var(--dark);
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 1rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.history-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
}

.history-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.user-profile {
    cursor: pointer;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

/* Hero Section */
.hero-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
}

.hero-visual {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

.floating-card.card-2 {
    left: 20%;
    animation-delay: 0.5s;
}

.floating-card.card-3 {
    right: 20%;
    animation-delay: 1s;
}

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

/* Stats Section */
.stats-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Tollgates Section */
.tollgates-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--light);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.tollgates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.tollgate-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.tollgate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.tollgate-card:hover::before {
    transform: scaleX(1);
}

.tollgate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.tollgate-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.tollgate-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}

.tollgate-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.tollgate-info p {
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tollgate-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.detail-item span {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
}

.detail-item strong {
    font-size: 1.1rem;
    color: var(--light);
}

.tollgate-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tollgate-price {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tollgate-price span {
    font-size: 0.9rem;
    font-weight: 500;
}

.select-btn {
    padding: 0.8rem 2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.select-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
}

.payment-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--danger);
    transform: rotate(90deg);
}

.payment-header {
    text-align: center;
    margin-bottom: 2rem;
}

.payment-header .tollgate-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.payment-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.payment-header p {
    color: var(--gray);
}

.vehicle-selection h3,
.payment-methods h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vehicle-options,
.method-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.vehicle-option,
.method-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.vehicle-option:hover,
.method-option:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.vehicle-option.active,
.method-option.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

.vehicle-option i,
.method-option i {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    display: block;
}

.vehicle-option .price {
    display: block;
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 700;
    margin-top: 0.5rem;
}

.payment-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--gray);
}

.summary-row.total {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--light);
}

.pay-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.pay-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.5);
}

/* ==================== PAYMENT ANIMATION ==================== */
.payment-animation {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: none;
    align-items: center;
    justify-content: center;
}

.payment-animation.active {
    display: flex;
}

.animation-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
}

.animation-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    z-index: 1;
}

/* Scene Management */
.scene {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s;
    pointer-events: none;
}

.scene.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

/* Scene 1: Tollgate Booth */
.scene-1 {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.tollgate-booth {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 180px;
}

.booth-roof {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px 10px 0 0;
    animation: roofGlow 2s ease-in-out infinite;
}

@keyframes roofGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.8); }
}

.booth-body {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #334155, #1e293b);
    border-radius: 0 0 10px 10px;
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.booth-window {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 50px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.3));
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 5px;
}

.booth-door {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: #475569;
    border-radius: 5px 5px 0 0;
}

.booth-sign {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: 900;
    font-size: 0.9rem;
    color: white;
    animation: signPulse 1.5s ease-in-out infinite;
}

@keyframes signPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

/* Barrier */
.barrier {
    position: absolute;
    right: -80px;
    top: 80px;
}

.barrier-pole {
    width: 100px;
    height: 8px;
    background: repeating-linear-gradient(90deg, #ef4444 0px, #ef4444 20px, white 20px, white 40px);
    border-radius: 4px;
    transform-origin: left center;
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.barrier-open .barrier-pole {
    transform: rotate(-70deg);
}

.barrier-base {
    width: 30px;
    height: 40px;
    background: #475569;
    border-radius: 5px;
}

/* Vehicle */
.vehicle {
    position: absolute;
    left: -100px;
    bottom: 60px;
    width: 80px;
    height: 50px;
    animation: vehicleApproach 3s ease-in-out forwards;
}

@keyframes vehicleApproach {
    0% { left: -100px; }
    40% { left: calc(50% - 100px); }
    50% { left: calc(50% - 100px); }
    70% { left: calc(50% + 80px); }
    100% { left: calc(50% + 80px); }
}

.vehicle-body {
    width: 100%;
    height: 35px;
    background: var(--gradient-primary);
    border-radius: 10px 15px 5px 5px;
    position: relative;
}

.vehicle-window {
    position: absolute;
    top: 5px;
    left: 15px;
    width: 25px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

.wheel {
    position: absolute;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: #1e293b;
    border: 3px solid #475569;
    border-radius: 50%;
    animation: wheelSpin 0.5s linear infinite;
}

.wheel-1 { left: 10px; }
.wheel-2 { right: 10px; }

@keyframes wheelSpin {
    to { transform: rotate(360deg); }
}

.road {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #334155;
    border-top: 3px dashed rgba(255, 255, 255, 0.3);
}

.payment-terminal {
    position: absolute;
    right: 20px;
    bottom: 80px;
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, #475569, #334155);
    border-radius: 5px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    opacity: 0;
    animation: terminalAppear 0.5s 1.5s forwards;
}

@keyframes terminalAppear {
    to { opacity: 1; }
}

.terminal-screen {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 30px;
    height: 20px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.terminal-card-slot {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
}

/* Scene 2: Payment Processing */
.scene-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: var(--radius-xl);
}

.payment-card {
    width: 200px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 2rem;
    animation: cardFloat 2s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

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

.card-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 5px;
    margin-bottom: 15px;
}

.card-number {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 8px;
}

.card-holder {
    height: 6px;
    width: 60%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.processing-ring {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 1.5rem;
}

.ring-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ringRotate 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.ring-segment:nth-child(2) {
    animation-delay: 0.2s;
    border-top-color: var(--secondary);
}

.ring-segment:nth-child(3) {
    animation-delay: 0.4s;
    border-top-color: var(--accent);
}

@keyframes ringRotate {
    to { transform: rotate(360deg); }
}

.processing-text {
    font-size: 1.2rem;
    color: var(--gray);
    animation: textPulse 1s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Scene 3: Success */
.scene-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(99, 102, 241, 0.2));
    border-radius: var(--radius-xl);
}

.success-check {
    width: 100px;
    height: 100px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    margin-bottom: 2rem;
    animation: checkPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.receipt-fly {
    position: absolute;
    font-size: 3rem;
    color: var(--primary-light);
    animation: receiptFly 1.5s ease-out forwards;
}

@keyframes receiptFly {
    0% { 
        opacity: 0;
        transform: translateY(50px) rotate(0deg);
    }
    50% {
        opacity: 1;
    }
    100% { 
        opacity: 0;
        transform: translateY(-100px) rotate(360deg);
    }
}

.success-text {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textSlideIn 0.5s 0.3s forwards;
    opacity: 0;
}

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

/* Progress Bar */
.animation-progress {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    z-index: 2;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s;
    border-radius: 10px;
}

/* Responsive Animation */
@media (max-width: 768px) {
    .animation-content {
        height: 300px;
    }
    
    .tollgate-booth {
        transform: translate(-50%, -50%) scale(0.7);
    }
    
    .vehicle {
        width: 60px;
        height: 40px;
    }
}

/* Success Modal */
.success-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
}

.success-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-content {
    text-align: center;
}

.success-animation {
    margin-bottom: 2rem;
}

.checkmark {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    animation: checkmark 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.success-content p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.receipt-preview {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.receipt-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--primary) 0px, var(--primary) 10px, transparent 10px, transparent 20px);
    animation: receiptScroll 3s linear infinite;
}

@keyframes receiptScroll {
    to { background-position: 20px 0; }
}

.receipt-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.2);
}

.receipt-header i {
    font-size: 2rem;
    color: var(--primary-light);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.receipt-header span {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.receipt-details {
    font-size: 1rem;
    line-height: 2.2;
}

.receipt-details > div {
    transition: all 0.3s;
}

.receipt-details > div:hover {
    transform: translateX(5px);
}

.receipt-details i {
    width: 25px;
    color: var(--primary-light);
    margin-right: 0.5rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-btn,
.continue-btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.continue-btn {
    background: var(--gradient-primary);
    color: white;
}

.continue-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* History Modal */
.history-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
}

.history-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-content {
    max-width: 600px;
}

.history-list {
    margin-top: 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.receipts-list {
    margin-top: 2rem;
    max-height: 500px;
    overflow-y: auto;
}

.receipts-list .history-item {
    border-left: 3px solid var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.history-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.history-item-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.history-item-info p {
    font-size: 0.85rem;
    color: var(--gray);
}

.history-item-amount {
    font-size: 1.3rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== ACCESSIBILITY ==================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
    font-weight: 700;
    z-index: 10001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
select:focus,
[tabindex="0"]:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tollgate-card,
    .modal-content,
    .stat-card {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-visual {
        display: none;
    }
    
    .tollgates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .animation-content {
        max-width: 500px;
        height: 350px;
    }
}

/* Mobile - 768px */
@media (max-width: 768px) {
    /* Typography */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    /* Onboarding */
    .onboarding-container {
        padding: 1rem;
    }
    
    .slide-title {
        font-size: 1.8rem;
    }
    
    .slide-description {
        font-size: 1rem;
    }
    
    .slide-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Header */
    .app-header {
        padding: 0.8rem 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .header-actions {
        gap: 1rem;
    }
    
    .history-btn,
    .avatar {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
 /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    /* Tollgates */
    .tollgates-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tollgate-card {
        padding: 1.5rem;
    }
    
    .tollgate-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .tollgate-info h3 {
        font-size: 1.2rem;
    }
    
    /* Payment Modal */
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .vehicle-options,
    .method-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vehicle-option,
    .method-option {
        padding: 0.8rem;
    }
    
    .vehicle-option i,
    .method-option i {
        font-size: 1.5rem;
    }
    
    .pay-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Animation */
    .animation-content {
        height: 300px;
    }
    
    .tollgate-booth {
        transform: translate(-50%, -50%) scale(0.7);
    }
    
    .vehicle {
        width: 60px;
        height: 40px;
    }
    
    .payment-card {
        width: 160px;
        height: 100px;
    }
    
    .processing-ring {
        width: 60px;
        height: 60px;
    }
    
    .success-check {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }
    
    .animation-progress {
        width: 250px;
        bottom: 20px;
    }
    
    /* Success Modal */
    .success-content h2 {
        font-size: 1.5rem;
    }
    
    .receipt-preview {
        padding: 1rem;
    }
    
    /* Footer */
    .app-footer {
        padding: 1.5rem;
        font-size: 0.85rem;
    }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    /* Typography */
    .hero-title {
        font-size: 1.8rem;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-description {
        font-size: 0.9rem;
    }
    
    /* Onboarding */
    .get-started-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Stats */
    .stat-info h3 {
        font-size: 1.3rem;
    }
    
    .stat-info p {
        font-size: 0.85rem;
    }
    
    /* Tollgates */
    .tollgate-card {
        padding: 1rem;
    }
    
    .tollgate-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tollgate-details {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .detail-item {
        padding: 0.8rem;
    }
    
    .tollgate-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .tollgate-price {
        text-align: center;
        font-size: 1.5rem;
    }
    
    .select-btn {
        width: 100%;
        padding: 0.8rem;
    }
    
    /* Search */
    .search-box {
        max-width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Modals */
    .modal-content {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .payment-header h2 {
        font-size: 1.5rem;
    }
    
    .summary-row {
        font-size: 0.9rem;
    }
    
    .summary-row.total {
        font-size: 1.1rem;
    }
    
    /* Animation */
    .animation-content {
        height: 250px;
    }
    
    .tollgate-booth {
        transform: translate(-50%, -50%) scale(0.6);
    }
    
    .vehicle {
        width: 50px;
        height: 35px;
    }
    
    .payment-card {
        width: 140px;
        height: 80px;
    }
    
    .processing-ring {
        width: 50px;
        height: 50px;
    }
    
    .processing-text {
        font-size: 1rem;
    }
    
    .success-check {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
    
    .success-text {
        font-size: 1.3rem;
    }
    
    .animation-progress {
        width: 200px;
        height: 4px;
    }
    
    /* History */
    .history-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .history-item-amount {
        font-size: 1.1rem;
    }
}

/* Landscape orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .onboarding-container {
        padding: 1rem 2rem;
    }
    
    .onboarding-slides {
        flex-direction: row;
    }
    
    .slide {
        max-width: 400px;
    }
    
    .animation-content {
        height: 250px;
    }
    
    .tollgate-booth {
        transform: translate(-50%, -50%) scale(0.6);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    button,
    .vehicle-option,
    .method-option,
    .tollgate-card {
        min-height: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .tollgate-card:hover,
    .stat-card:hover,
    .vehicle-option:hover,
    .method-option:hover {
        transform: none;
    }
    
    /* Active states instead */
    .tollgate-card:active,
    .stat-card:active,
    .vehicle-option:active,
    .method-option:active {
        transform: scale(0.98);
    }
}

/* Print styles */
@media print {
    .app-header,
    .hero-section,
    .stats-section,
    .tollgates-section,
    .onboarding-container,
    .payment-animation,
    .app-footer {
        display: none !important;
    }
    
    .receipt-preview {
        border: 2px solid #000;
        background: white;
        color: black;
    }
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4rem;
}

.app-footer i {
    color: var(--danger);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.2); }
    20%, 40% { transform: scale(1); }
}

.app-footer strong {
    color: var(--primary-light);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}
