:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --glass-blur: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--primary-hover); }

/* Typography */
h1, h2, h3 { font-weight: 600; margin-bottom: 0.5rem; }
.subtitle { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.hidden { display: none !important; }

/* Glassmorphism Classes */
.glass {
    background: var(--surface-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.8);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2.5rem;
}
.logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.main-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.logout-btn {
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 8px;
}
.logout-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.content-area {
    flex-grow: 1;
    padding: 2.5rem 3rem;
    max-width: none;
    margin: 0;
}

/* Cards */
.card {
    padding: 2rem;
    margin-bottom: 2rem;
}

.hero-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.4) 100%);
}
.hero-content { flex: 1; }
.hero-image {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
}
.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: luminosity;
    opacity: 0.8;
}

/* Forms */
.form-card h3 { margin-bottom: 1.5rem; }
.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.flex-grow { flex-grow: 1; min-width: 200px; }

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

input, select {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 1rem;
}
.btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: var(--primary);
}
.btn-icon.delete:hover {
    color: var(--danger);
}

/* Table */
.events-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.events-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}
.events-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}
.events-table tr:last-child td { border-bottom: none; }
.events-table tbody tr {
    transition: background-color 0.2s ease;
}
.events-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    text-align: center;
}
.auth-container h2 {
    margin-bottom: 2rem;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}
.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}
.auth-links {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
/* Public Page Styles */
.public-page {
    display: flex;
    flex-direction: column;
}

.public-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container .logo {
    margin-bottom: 0;
}

.public-content {
    flex-grow: 1;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.public-form-card {
    max-width: 100%;
    margin: -60px auto 2rem auto;
    position: relative;
    z-index: 10;
}

/* Lighter Theme Overrides */
:root {
    --bg-color: #f8fafc;
    --surface-color: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
}

body {
    background-image: none;
}

/* Hero Overlay Layout */
.hero-overlay-card {
    position: relative;
    width: 100%;
    min-height: 280px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-text-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-text-bottom h2 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.hero-text-bottom p {
    color: var(--text-muted);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.toast {
    background: white;
    color: var(--text-main);
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 350px;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

input, select {
    background: #fff;
    color: var(--text-main);
}
.glass {
    background: var(--surface-color);
}
.sidebar {
    background: #fff;
}
.public-nav {
    background: #fff;
}

/* Public Footer */
.public-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}
