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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
.header {
    text-align: center;
    padding: 48px 0 24px;
    color: #fff;
}
.header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header p {
    color: rgba(255,255,255,0.8);
    margin-top: 8px;
    font-size: 15px;
    font-weight: 400;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    backdrop-filter: blur(20px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:active {
    transform: scale(0.98);
}
.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1d1d1f;
}
.card-subtitle {
    color: #86868b;
    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: #fff;
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
}
.session-item:active {
    transform: scale(0.97);
}
.session-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}
.session-info p {
    font-size: 13px;
    color: #86868b;
    margin-top: 4px;
}
.session-badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-available {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #2d3436;
}
.badge-full {
    background: #ffeaea;
    color: #d63031;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #636e72;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #f0f0f5;
    border-radius: 14px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    background: #fafafa;
    -webkit-appearance: none;
}
.form-group input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}
.form-group input::placeholder {
    color: #b2bec3;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    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.97);
    opacity: 0.9;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
}
.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(102,126,234,0.5);
}
.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}
.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-secondary-dark {
    background: #f0f0f5;
    color: #1d1d1f;
}
.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
    width: auto;
    display: inline-block;
    border-radius: 10px;
}

/* Confirm Page */
.confirm-wrapper {
    text-align: center;
}
.confirm-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 42px;
    box-shadow: 0 8px 24px rgba(168,237,234,0.4);
}
.confirm-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.confirm-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-bottom: 24px;
}
.confirm-code {
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 14px;
    letter-spacing: 2px;
    margin: 16px 0;
    color: #667eea;
}
.ticket-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
}
.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #a8edea);
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f7;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    color: #86868b;
    font-size: 14px;
}
.detail-value {
    font-weight: 600;
    font-size: 14px;
    color: #1d1d1f;
}

/* Error */
.error-msg {
    background: linear-gradient(135deg, #ffeaea, #fff5f5);
    color: #d63031;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border-left: 4px solid #d63031;
}

/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    color: #fff;
}
.admin-header h1 {
    font-size: 22px;
    font-weight: 700;
}
.table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f5f5f7;
}
th {
    font-weight: 600;
    color: #86868b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fafafa;
}
tr:hover {
    background: #f8f9fa;
}

/* Floating elements */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102,126,234,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.fab:active {
    transform: scale(0.9);
}

/* 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: rgba(255,255,255,0.7);
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.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: #fff;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}
.event-banner {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f5;
}
.event-card-body {
    padding: 16px 18px;
}
.event-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 6px;
    line-height: 1.3;
}
.event-card-desc {
    font-size: 14px;
    color: #636e72;
    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: #86868b;
    background: #f5f5f7;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}
.status-draft { background: #fff3cd; color: #856404; }
.status-published { background: #d4edda; color: #155724; }
.status-paused { background: #f0f0f5; color: #86868b; }

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