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

:root {
    --brand: #FF6900;
    --brand-light: #FFF4ED;
    --brand-dark: #E05500;
    --page: #F5F3F0;
    --surface: #FFFFFF;
    --border: #EDEBE7;
    --divider: #E8E5E0;
    --text: #2D2926;
    --text-secondary: #5C5752;
    --text-tertiary: #A8A29E;
    --success: #00C48C;
    --warning: #FFB020;
    --danger: #FF4757;
    --shadow: 0 1px 3px rgba(45, 41, 38, 0.04), 0 12px 28px rgba(45, 41, 38, 0.06);
    --shadow-soft: 0 1px 3px rgba(45, 41, 38, 0.04);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at 14% 0%, rgba(255, 105, 0, 0.06), transparent 30%), #F5F3F0;
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 48px 0 24px;
    color: var(--text);
}

.header h1 {
    position: relative;
    display: inline-block;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
    text-shadow: none;
}

.header h1::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 36px;
    height: 3px;
    border-radius: 999px;
    background: var(--brand);
    transform: translateX(-50%);
}

.header p {
    color: var(--text-secondary);
    margin-top: 18px;
    font-size: 15px;
    font-weight: 400;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:active {
    transform: scale(0.99);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Event List */
.event-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Session List */
.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.session-item:active {
    transform: scale(0.98);
}

.session-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.session-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.session-badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-available {
    background: rgba(0, 196, 140, 0.12);
    color: #008A62;
}

.badge-full {
    background: rgba(255, 71, 87, 0.12);
    color: var(--danger);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    background: var(--page);
    color: var(--text);
    -webkit-appearance: none;
}

.form-group input:focus {
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.btn:active {
    transform: scale(0.98);
    opacity: 0.94;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--brand) 30%, transparent);
}

.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--brand) 32%, transparent);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.24);
}

.btn-secondary {
    background: var(--brand-light);
    color: var(--brand);
    border: 1px solid var(--brand);
    box-shadow: var(--shadow-soft);
}

.btn-secondary-dark {
    background: var(--brand-light);
    color: var(--brand);
    border: 1px solid var(--brand);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
    width: auto;
    display: inline-block;
    border-radius: 10px;
}

/* Confirm Page */
.confirm-wrapper {
    text-align: center;
    padding-top: 32px;
}

.confirm-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--success), #3EE3B5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 42px;
    box-shadow: 0 8px 24px rgba(0, 196, 140, 0.26);
}

.confirm-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.confirm-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.confirm-code {
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    background: var(--brand-light);
    border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
    border-radius: 12px;
    letter-spacing: 2px;
    margin: 16px 0;
    color: var(--brand);
}

.ticket-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-value {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    text-align: right;
}

/* Error */
.error-msg {
    background: rgba(255, 71, 87, 0.08);
    color: var(--danger);
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border-left: 4px solid var(--brand);
}

/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px 20px;
    color: #fff;
    background: var(--text);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(45, 41, 38, 0.14);
}

.admin-header h1 {
    font-size: 22px;
    font-weight: 700;
}

.admin-header .btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--divider);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--page);
}

tr:hover {
    background: var(--brand-light);
}

/* Floating elements */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 34%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.fab:active {
    transform: scale(0.92);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease-out;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state .icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 20px;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 36px;
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
}

/* Mobile safe area */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Event Cards (Reddit style) */
.event-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.event-card:active {
    transform: scale(0.99);
    box-shadow: var(--shadow-soft);
}

.event-banner {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #F3D7C6;
}

.event-banner:not([style*="background-image"]) {
    background: linear-gradient(135deg, #FFF4ED 0%, #F3D7C6 100%);
}

.event-card-body {
    padding: 16px 18px;
}

.event-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.event-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-tag {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--page);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
}

.event-card .event-card-desc,
.event-card .event-card-meta,
.event-card .meta-tag {
    color: var(--text-secondary) !important;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.status-draft {
    background: rgba(255, 176, 32, 0.14);
    color: #9A6400;
}

.status-published {
    background: rgba(0, 196, 140, 0.12);
    color: #008A62;
}

.status-paused {
    background: var(--page);
    color: var(--text-tertiary);
}

/* Admin Action Bar */
.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.admin-actions form {
    display: inline;
}

/* Search Bar */
.search-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    background: transparent;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: transparent;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: var(--brand);
}

.search-bar input::placeholder {
    color: var(--text-tertiary);
}
