/* Event Booking System - Dark Theme (Inspired by The Arena Kuwait) */

/* CSS Variables for consistent theming */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: #16213e;
    --bg-card-hover: #1e2a4a;

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6c6c7a;

    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    --success: #00d26a;
    --warning: #ffc107;
    --danger: #ff4757;
    --info: #17a2b8;

    --border-color: rgba(102, 126, 234, 0.2);
    --border-color-light: rgba(255, 255, 255, 0.1);

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        var(--bg-primary);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* Navbar */
.navbar {
    background: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand img,
.navbar-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* Footer Logo */
.footer-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius-xl);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    background: var(--accent-gradient);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline-primary:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: var(--text-primary);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.btn-success {
    background: var(--success);
}

.btn-danger {
    background: var(--danger);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
}

.card-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Event Cards */
.event-card {
    position: relative;
    overflow: hidden;
}

.event-price {
    color: var(--accent-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 70% 50%, rgba(118, 75, 162, 0.2) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Section Styling */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

/* Forms */
.form-control,
.form-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-check-input {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Tables */
.table {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.table thead th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: var(--border-color-light);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

.table-dark {
    background: var(--bg-card);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-xl);
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-primary, .bg-primary {
    background: var(--accent-gradient) !important;
}

.badge-success, .bg-success {
    background: var(--success) !important;
}

.badge-warning, .bg-warning {
    background: var(--warning) !important;
    color: #000;
}

.badge-danger, .bg-danger {
    background: var(--danger) !important;
}

.badge-info, .bg-info {
    background: var(--info) !important;
}

/* Modals */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

.btn-close {
    filter: invert(1);
}

/* Alerts */
.alert {
    border-radius: var(--border-radius-md);
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: rgba(0, 210, 106, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.page-item .page-link {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
}

.page-item .page-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background: var(--accent-gradient);
    border-color: transparent;
    color: var(--text-primary);
}

/* Booking Wizard */
.booking-wizard {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.wizard-step .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wizard-step.active .step-number {
    background: var(--accent-gradient);
    border-color: transparent;
}

.wizard-step.completed .step-number {
    background: var(--success);
    border-color: transparent;
}

.wizard-step .step-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.wizard-step.active .step-label,
.wizard-step.completed .step-label {
    color: var(--text-primary);
}

/* Seat Category Selection */
.seat-category {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.seat-category:hover {
    border-color: var(--accent-primary);
}

.seat-category.selected {
    border-color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.1);
}

.seat-category-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.seat-category-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.seat-category-availability {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.seat-category-availability.low {
    color: var(--warning);
}

.seat-category-availability.soldout {
    color: var(--danger);
}

/* Timer */
.booking-timer {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.booking-timer .time {
    font-size: 2rem;
    font-weight: 700;
    color: var(--warning);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer h5 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent-gradient);
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
}

/* Loader */
.loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }

    .section { padding: 3rem 0; }

    .wizard-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .wizard-step .step-label {
        display: none;
    }

    .navbar-collapse {
        background: var(--bg-card);
        padding: 1rem;
        border-radius: var(--border-radius-md);
        margin-top: 1rem;
    }
}

/* Admin Panel Specific */
.admin-sidebar {
    background: var(--bg-secondary);
    min-height: 100vh;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius-md);
    margin-bottom: 0.5rem;
    transition: all var(--transition-fast);
}

.admin-sidebar-link:hover,
.admin-sidebar-link.active {
    background: var(--accent-gradient);
    color: var(--text-primary);
}

.admin-sidebar-link i {
    margin-right: 0.75rem;
    width: 20px;
}

.admin-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

/* Stats Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.primary::before { background: var(--accent-primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* QR Scanner */
.qr-scanner-container {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
}

.qr-scanner-preview {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.qr-scanner-preview video {
    width: 100%;
    display: block;
}

.scan-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
}

.scan-result.success {
    background: rgba(0, 210, 106, 0.1);
    border: 1px solid var(--success);
}

.scan-result.error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--danger);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Bootstrap Text Overrides for Dark Theme */
.text-muted {
    color: var(--text-secondary) !important;
}

p, .card-text, .list-group-item, strong, .text-dark {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.list-group-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.list-group-item strong {
    color: var(--text-primary) !important;
}

small, .small {
    color: var(--text-secondary) !important;
}

/* Heading Overrides */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-primary) !important;
}

/* Lead text */
.lead {
    color: var(--text-secondary) !important;
}

/* Display text */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    color: var(--text-primary) !important;
}

/* Card Header Override */
.card-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Form Labels and Text */
label, .form-label {
    color: var(--text-secondary) !important;
}

/* Input Group */
.input-group-text {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Form Check Labels */
.form-check-label {
    color: var(--text-primary) !important;
}

/* Contact Page Hero */
.page-hero {
    background: var(--accent-gradient) !important;
    color: var(--text-primary) !important;
    padding: 80px 0;
    text-align: center;
}

.page-hero h1, .page-hero p {
    color: var(--text-primary) !important;
}

/* Placeholder Image for Events */
.event-placeholder-image {
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.event-placeholder-image i {
    font-size: 4rem;
    color: var(--text-muted);
}

/* Utilities */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--accent-gradient);
}

.glow {
    box-shadow: var(--shadow-glow);
}

/* Dropdown */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* Container adjustments */
.container, .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
