/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Variables */
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --accent-color: #f72585;
    --success-color: #4cc9f0;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --border-color: #e1e5e9;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
}

.dark-theme {
    /* Dark Theme Variables */
    --primary-color: #5a6ff0;
    --primary-dark: #4a5de0;
    --secondary-color: #9d4edd;
    --accent-color: #ff3e8a;
    --success-color: #00d4ff;
    --text-color: #f0f0f0;
    --text-light: #b0b0b0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --header-bg: #1a1a1a;
    --border-color: #333333;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-btn:hover {
    color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
}

.nav-btn.active {
    color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.15);
}

/* Theme Toggle */
.theme-toggle {
    margin-left: 10px;
}

#theme-switch {
    display: none;
}

.theme-label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.theme-label i {
    position: absolute;
    top: 7px;
    font-size: 16px;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-label .fa-sun {
    left: 8px;
}

.theme-label .fa-moon {
    right: 8px;
}

.theme-ball {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

#theme-switch:checked + .theme-label .theme-ball {
    transform: translateX(30px);
}

/* Main Content */
.main-content {
    padding: 2rem 0 4rem;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

.section.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

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

.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 2rem;
}

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

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.event-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.event-image {
    height: 180px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.event-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.event-content {
    padding: 1.5rem;
}

.event-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.event-details i {
    width: 20px;
    color: var(--primary-color);
    margin-right: 8px;
}

.event-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.event-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius);
    position: relative;
    animation: slideUp 0.4s ease;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent-color);
}

#modal-content {
    padding: 2.5rem;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background-color: var(--card-bg);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    display: none;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
}

.close-cart {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--accent-color);
}

.cart-items {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.cart-item {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.cart-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.cart-item-info h4 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.cart-item-info .ticket-type {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.cart-item-quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 5px;
    transition: var(--transition);
}

.remove-item:hover {
    color: var(--accent-color);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Cart Icon */
.cart-icon-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.cart-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.cart-icon:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Tickets Section */
.tickets-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.ticket-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--success-color);
    transition: var(--transition);
}

.ticket-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

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

.ticket-id {
    font-size: 0.9rem;
    color: var(--text-light);
    background-color: rgba(0, 0, 0, 0.05);
    padding: 3px 10px;
    border-radius: 20px;
}

.ticket-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.ticket-type-badge {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.ticket-details {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

/* Checkout */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.checkout-form, .order-summary {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.checkout-form h3, .order-summary h3 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

#checkout-items {
    margin-bottom: 2rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

/* Success Card */
.success-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.success-card h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.success-card p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1200;
    transition: transform 0.4s ease;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast i {
    font-size: 1.5rem;
}

.toast.success i {
    color: var(--success-color);
}

.toast.error i {
    color: var(--accent-color);
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .tickets-container {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .event-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 20px auto;
        width: 95%;
    }
    
    #modal-content {
        padding: 1.5rem;
    }
}