/* Global Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-secondary);
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
}

#blazor-error-ui {
    position: fixed;
}

/* Page Layout - Vertical Stack */
.page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    width: 100% !important;
}

.main-content {
    flex: 1 !important;
    width: 100% !important;
    display: block !important;
}

.main-header {
    flex-shrink: 0 !important;
    width: 100% !important;
}

.main-footer {
    flex-shrink: 0 !important;
    width: 100% !important;
    margin-top: auto !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.main-header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
}

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

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.header-logo:hover .logo-image {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    gap: 2rem;
    flex: 1;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sell-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    border-radius: 0.5rem;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.2s;
}

.sell-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.cart-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: background-color 0.2s;
}

.cart-button:hover {
    background-color: var(--border-color);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Button Styles */
.btn-primary, .btn-secondary {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Home Page */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.search-bar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.search-button {
    width: 100%;
    padding: 1rem 2rem;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-button:hover {
    background-color: var(--bg-secondary);
}

/* Categories */
.categories {
    padding: 3rem 0;
    background-color: white;
}

.categories h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.category-card {
    padding: 2rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.category-card:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Event Grid */
.upcoming-events {
    padding: 3rem 0;
}

.upcoming-events h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.event-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.event-details {
    padding: 1rem;
}

.event-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.event-date, .event-venue {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.event-price {
    font-weight: bold;
    color: var(--primary-color);
}

.event-availability {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Features */
.features {
    padding: 3rem 0;
    background-color: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-light);
}

/* Footer */
.main-footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
    width: 100%;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    font-size: 1.25rem;
    color: var(--text-light);
}

/* Authentication Pages */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.auth-header p {
    color: var(--text-light);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fee2e2;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.validation-summary {
    background-color: #fee2e2;
    color: var(--error-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.validation-summary ul {
    margin: 0;
    padding-left: 1.5rem;
}

.validation-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.demo-credentials h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.demo-credentials p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .search-bar {
        max-width: 100%;
    }

    .main-nav {
        display: none;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        flex-wrap: wrap;
    }
}

/* Optional: Horizontal search bar on larger screens (uncomment if desired) */
/*
@media (min-width: 769px) {
    .search-bar {
        flex-direction: row;
        gap: 0.5rem;
    }

    .search-input {
        flex: 1;
    }

    .search-button {
        width: auto;
    }
}
*/
