/* Modern ECU Remapping Portal - Enhanced Design System */

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth page transitions */
.page-transition {
    animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 120px 0 100px 0;
    margin-top: 0;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--light-color));
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
}

.hero-section .lead {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1.8;
}

.hero-section .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: width 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.dashboard-card:hover::before {
    width: 6px;
}

.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Stats Cards */
.stats-card {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    transition: transform 0.5s ease;
}

.stats-card:hover {
    border-left-color: var(--primary-dark);
    transform: translateY(-4px);
}

.stats-card:hover::after {
    transform: scale(1.1);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
    transition: all var(--transition-normal);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-open {
    background: #fef3c7;
    color: #92400e;
}

.status-resolved {
    background: #d1fae5;
    color: #065f46;
}

.status-closed {
    background: #e5e7eb;
    color: #374151;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--light-color);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--light-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9ff 100%);
}

.file-upload-area.dragover,
.file-upload-area.drag-over {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    transform: scale(1.02);
}

.file-upload-area.has-file {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

#upload_progress_container {
    margin-top: 20px;
}

#upload_progress_container .progress {
    height: 30px;
    border-radius: 15px;
}

#upload_progress_container .progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
}

.file-upload-area i {
    color: var(--primary-color);
    margin-bottom: 16px;
}

.file-upload-area p {
    color: var(--text-secondary);
    margin: 8px 0;
}

/* Tune Package Cards */
.package-card {
    transition: all 0.3s ease;
    border: 2px solid var(--border-color) !important;
    position: relative;
    overflow: hidden;
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.package-card:hover::before {
    transform: scaleX(1);
}

.package-card.selected {
    border-color: var(--primary-color) !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    box-shadow: var(--shadow-lg);
}

.package-card.selected::before {
    transform: scaleX(1);
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--form-text-color, var(--text-primary));
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--form-text-color, var(--text-primary));
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    color: var(--form-text-color, var(--text-primary));
}

.form-text {
    color: var(--form-text-color, var(--text-secondary));
    font-size: 0.875rem;
}

.form-check-label {
    color: var(--form-text-color, var(--text-primary));
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.125rem;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--info-color);
    color: #1e40af;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: var(--danger-color);
    color: #991b1b;
}

/* Navigation */
.navbar {
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    min-height: 70px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none !important;
}

.navbar-brand:hover {
    color: white !important;
}

/* Force horizontal navbar on desktop */
.navbar-expand-lg .navbar-nav {
    flex-direction: row !important;
    display: flex !important;
}

.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
    margin: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none !important;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    display: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile responsive - only apply vertical on small screens */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: block;
    }
    
    .navbar-collapse {
        display: none;
    }
    
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        display: block;
    }
    
    .navbar-nav {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-top: 10px;
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        width: 100%;
        padding: 10px 16px !important;
    }
}

/* Ensure Bootstrap classes work */
.navbar-expand-lg .navbar-nav .nav-link {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: var(--radius-md);
    background: var(--border-color);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: var(--radius-md);
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card.text-center {
    padding: 30px 20px;
}

.card.text-center i {
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.card.text-center:hover i {
    transform: scale(1.1);
}

.card.text-center h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.card.text-center p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.card-header {
    background: var(--light-color);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Ticket System Text Colors */
.ticket-card .card-title,
.ticket-card .card-text,
.ticket-message,
.ticket-subject,
.ticket-details,
.view-ticket .card-title,
.view-ticket .card-text,
.view-ticket .card-body p,
.admin-tickets .card-title,
.admin-tickets .card-text {
    color: var(--ticket-text-color, var(--text-primary));
}

/* Admin Dashboard Text Colors */
.dashboard-card,
.dashboard-card h2,
.dashboard-card h3,
.dashboard-card h4,
.dashboard-card h5,
.dashboard-card h6,
.dashboard-card p,
.dashboard-card .table,
.dashboard-card .table th,
.dashboard-card .table td,
.admin-content,
.admin-content h1,
.admin-content h2,
.admin-content h3,
.admin-content h4,
.admin-content p,
.admin-dashboard .card-title,
.admin-dashboard .card-text {
    color: var(--admin-text-color, var(--text-primary));
}

/* Ticket Status Card Text Colors */
.stats-card .stat-value,
.stats-card .stat-label {
    color: var(--ticket-status-card-text-color, var(--text-primary));
}

/* Activity Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 20px;
    bottom: -20px;
    width: 2px;
    background: var(--border-color);
}

.timeline-marker {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-marker i {
    font-size: 10px;
    background: white;
    border-radius: 50%;
}

/* Power Badges */
.power-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    margin-right: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}

.power-original {
    background: #6b7280;
    color: white;
}

.power-tuned {
    background: var(--success-color);
    color: white;
}

.power-gain {
    background: var(--warning-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        min-height: 400px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .file-upload-area {
        padding: 40px 20px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile-friendly buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        touch-action: manipulation;
    }
    
    /* Better touch targets */
    .nav-link {
        padding: 12px 16px !important;
    }
    
    /* Card improvements for mobile */
    .card {
        margin-bottom: 16px;
    }
    
    /* Form improvements */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Table improvements */
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
    }
}

/* Touch interactions */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    /* Larger touch targets */
    a, button, .btn, .nav-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better file upload area for touch */
    .file-upload-area {
        min-height: 200px;
        padding: 60px 20px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   ECU REMAPPING ANIMATION BACKGROUND
   ============================================ */

.ecu-animation-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
    overflow: hidden;
}

/* ECU Chip Animation */
.ecu-chip {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 120px;
    height: 80px;
    animation: floatChip 6s ease-in-out infinite;
}

.chip-body {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    animation: pulseChip 2s ease-in-out infinite;
}

.chip-pins {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.chip-pins .pin {
    width: 4px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    animation: blinkPin 1.5s ease-in-out infinite;
}

.chip-pins .pin:nth-child(1) { animation-delay: 0s; }
.chip-pins .pin:nth-child(2) { animation-delay: 0.2s; }
.chip-pins .pin:nth-child(3) { animation-delay: 0.4s; }
.chip-pins .pin:nth-child(4) { animation-delay: 0.6s; }
.chip-pins .pin:nth-child(5) { animation-delay: 0.8s; }
.chip-pins .pin:nth-child(6) { animation-delay: 1s; }
.chip-pins .pin:nth-child(7) { animation-delay: 1.2s; }
.chip-pins .pin:nth-child(8) { animation-delay: 1.4s; }

.chip-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.data-flow {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: 4px;
}

.data-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    margin-bottom: 4px;
    animation: dataFlow 2s linear infinite;
}

.data-line:nth-child(2) { animation-delay: 0.5s; }
.data-line:nth-child(3) { animation-delay: 1s; }

/* Car Silhouette */
.car-silhouette {
    position: absolute;
    bottom: 15%;
    right: 15%;
    width: 300px;
    height: 150px;
    opacity: 0.2;
    animation: carMove 8s ease-in-out infinite;
}

.car-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Power Waves */
.power-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: waveExpand 3s ease-out infinite;
}

.wave-1 {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
}

.wave-2 {
    width: 200px;
    height: 200px;
    animation-delay: 1s;
}

.wave-3 {
    width: 300px;
    height: 300px;
    animation-delay: 2s;
}

/* Animations */
@keyframes floatChip {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulseChip {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.4); }
}

@keyframes blinkPin {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes dataFlow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@keyframes carMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(20px) translateY(-10px); }
    50% { transform: translateX(0) translateY(-20px); }
    75% { transform: translateX(-20px) translateY(-10px); }
}

@keyframes waveExpand {
    0% {
        width: 100px;
        height: 100px;
        opacity: 0.8;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* Text Animations */
.animate-fade-in {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.animate-fade-in-delay-3 {
    animation: fadeInUp 1s ease-out 0.9s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.feature-icon-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.1;
    animation: iconPulse 3s ease-in-out infinite;
}

.feature-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: var(--primary-color);
    z-index: 2;
}

.feature-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.2; }
}

/* Process Section */
.process-section {
    padding: 80px 0;
}

.process-step {
    text-align: center;
    padding: 30px 20px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.step-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    color: white;
    font-size: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.process-step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Tuned Cars Section */
.tuned-cars-section {
    padding: 80px 0;
}

.tuned-car-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
}

.tuned-car-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.car-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tuned-car-card:hover .car-image {
    transform: scale(1.1);
}

.car-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

.power-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.power-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.power-original {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.power-tuned {
    background: var(--success-color);
    color: white;
}

.power-arrow {
    color: white;
    font-size: 1.2rem;
}

.car-card-body {
    padding: 25px;
}

.car-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.car-engine {
    font-size: 0.875rem;
    margin-bottom: 15px;
}

.power-gain-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--radius-md);
}

.gain-badge {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
}

.gain-percentage {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.car-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
}

.stat-box {
    padding: 40px 20px;
    text-align: center;
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.8;
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Login & Signup Pages */
.login-container,
.signup-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-card,
.signup-card {
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.login-card .card-header,
.signup-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border: none;
}

.login-card .card-header h2,
.signup-card .card-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.login-card .card-body,
.signup-card .card-body {
    padding: 40px;
    background: white;
}

.login-card .form-label,
.signup-card .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-card .form-control,
.signup-card .form-control {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.login-card .form-control:focus,
.signup-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.login-card .btn-primary,
.signup-card .btn-primary {
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.login-card .text-center a,
.signup-card .text-center a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.login-card .text-center a:hover,
.signup-card .text-center a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ecu-chip {
        width: 80px;
        height: 60px;
        top: 15%;
        left: 5%;
    }
    
    .car-silhouette {
        width: 200px;
        height: 100px;
        bottom: 10%;
        right: 5%;
    }
    
    .power-waves {
        width: 300px;
        height: 300px;
    }
    
    .feature-icon-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .login-container,
    .signup-container {
        padding: 20px 15px;
    }
    
    .login-card .card-body,
    .signup-card .card-body {
        padding: 30px 20px;
    }
    
    .signup-card {
        max-width: 100%;
    }
}

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

