/* Modern User-Facing Event Portal Stylesheet */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #64748b;
    --accent: #f59e0b;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 16px -2px rgba(0, 0, 0, 0.08), 0 3px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navbar */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.badge {
    background-color: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: #fff;
    padding: 5rem 1.5rem 6rem;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.25), transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 840px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
}

/* Hero Search Box Widget */
.search-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 760px;
    margin: 0 auto;
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.search-field input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.search-btn {
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
}

/* Category Pills Section */
.categories-section {
    padding: 2rem 0 1rem;
}

.category-pills {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    padding: 0.65rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

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

.pill.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Main Event Grid & Section */
.section {
    padding: 3rem 0;
}

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

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.select-sort {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
}

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

/* User Event Card Component */
.user-event-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    cursor: pointer;
}

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

.card-img-wrapper {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.user-event-card:hover .card-img {
    transform: scale(1.05);
}

.date-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.date-badge .day {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

.date-badge .month {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dark);
}

.bookmark-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.bookmark-btn:hover, .bookmark-btn.saved {
    background-color: #fff;
    color: #ef4444;
    transform: scale(1.1);
}

.card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-bottom {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

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

.btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

.btn-icon {
    padding: 0.6rem;
    position: relative;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-dark);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.825rem;
}

.full-width {
    width: 100%;
}

.margin-top-xs {
    margin-top: 0.5rem;
}

.bookmark-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
}

/* Event Detail Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.5rem;
}

.modal-card {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 580px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalPop 0.25s ease-out;
}

.modal-lg {
    max-width: 900px;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-detail-hero {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 1.5rem;
    display: flex;
    align-items: flex-end;
}

.detail-category {
    background-color: var(--primary);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-detail-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem;
}

.detail-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.meta-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-dark);
}

.meta-card strong {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.highlights-list {
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.highlights-list li {
    margin-bottom: 0.4rem;
}

/* Booking Widget Card */
.booking-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 1rem;
}

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

.booking-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.qty-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem;
    justify-content: space-between;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.booking-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
}

/* Checkout Form Modal */
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.order-summary-box {
    background-color: var(--primary-light);
    border: 1px solid #c7d2fe;
    padding: 1rem;
    border-radius: var(--radius-md);
}

.order-summary-box h4 {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

label {
    font-size: 0.85rem;
    font-weight: 700;
}

input, select {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
}

/* Side Drawer (My Tickets & Bookmarks) */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.5);
    z-index: 100;
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: drawerSlide 0.25s ease-out;
}

@keyframes drawerSlide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.drawer-tab {
    flex: 1;
    padding: 0.85rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.drawer-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.drawer-body {
    padding: 1.25rem;
    flex: 1;
    overflow-y: auto;
}

.ticket-item-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ticket-item-card h4 {
    font-size: 1rem;
    font-weight: 700;
}

.ticket-meta {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.ticket-badge {
    display: inline-block;
    background-color: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    align-self: flex-start;
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: #fff;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-links h4, .footer-newsletter h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.newsletter-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.newsletter-box input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    font-size: 0.85rem;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 200;
}

.toast {
    background-color: var(--text-dark);
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden { display: none !important; }

/* Responsive Media Queries */
@media (max-width: 900px) {
    .event-detail-body { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .hero-content h1 { font-size: 2.25rem; }
}

@media (max-width: 640px) {
    .search-box { flex-direction: column; }
    .search-field { width: 100%; }
    .footer-content { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}
