* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.app-wrapper {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    display: flex;
    height: calc(100vh - 76px);
    width: 300vw;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate3d(-100vw, 0, 0);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.screen {
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    flex-basis: 100vw;
    padding: 15px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

/* Region name sits centered right above the screen title */
.screen-header h1 .region-label {
    display: block;
    max-width: 100%;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.3px;
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-header h1 .title-text {
    display: block;
    line-height: 1.3;
}

/* Grid layout guarantees the title stays visually centered no matter how
   wide the left/right side clusters are, since both outer tracks are 1fr */
.screen-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px;
    color: white;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    position: relative;
    z-index: 1100;
}

.screen-header h1 {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    max-width: 100%;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-self: center;
}

.header-right-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    justify-self: end;
    min-width: 0;
}

.header-left-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    justify-self: start;
    min-width: 0;
}

.nav-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
    justify-self: start;
}

.nav-hint:active {
    opacity: 0.5;
}

.nav-hint.hidden {
    visibility: hidden;
    cursor: default;
    pointer-events: none;
}

.nav-arrow {
    font-size: 14px;
}

.filter-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.filter-button:active {
    background: rgba(255, 255, 255, 0.3);
}

.filter-button.active {
    background: rgba(255, 255, 255, 0.35);
}

.search-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-button:active {
    background: rgba(255, 255, 255, 0.3);
}

.search-button.active {
    background: rgba(255, 255, 255, 0.35);
}

.search-dropdown {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    padding: 18px;
    display: none;
    z-index: 1600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: min(320px, 90vw);
}

.search-dropdown.show {
    display: block;
}

.search-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 2px;
}

.search-close:hover {
    color: #666;
}

.search-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    font-size: 15px;
    color: #333;
    margin-bottom: 12px;
    margin-top: 4px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.search-nav button {
    background: #f0f0f5;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    color: #667eea;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-nav button:hover:not(:disabled) {
    background: #e4e4f5;
}

.search-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.search-count {
    color: #555;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.concert-item.search-active-match {
    box-shadow: 0 0 0 3px #38bdf8, 0 8px 20px rgba(0, 0, 0, 0.15);
}

.filter-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    min-width: 290px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    z-index: 1100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-menu.show {
    display: block;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    user-select: none;
}

.filter-item:last-child {
    margin-bottom: 0;
}

.filter-item:active {
    background: rgba(255, 255, 255, 0.2);
}

.filter-item.show-all {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    padding-bottom: 12px;
    font-weight: 600;
}

.filter-item.unchecked {
    opacity: 0.3;
}

/* Event types: two columns to save height */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.filter-grid .filter-item {
    margin-bottom: 0;
    padding: 8px 7px;
    min-width: 0;
}

/* "All / None" is just the last cell of the grid: no divider, no extra spacing */
.filter-grid .filter-item.show-all {
    border-bottom: none;
    margin-bottom: 0;
    padding: 8px 7px;
}

.filter-grid .filter-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.filter-grid .filter-checkbox.checked::after {
    font-size: 12px;
}

.filter-grid .filter-label {
    font-size: 13px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-grid .filter-color {
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 4px;
}

/* Shown when filters hide every event on a screen */
.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    padding: 40px 20px;
}

.empty-reset {
    margin-top: 14px;
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    background: white;
    color: #667eea;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Region dropdown (below the event types) */
.filter-region {
    margin-bottom: 8px;
}

.filter-region-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    margin: 4px 2px 5px;
}

/* Region chips: bright, bold tap targets (used in the filter menu and at sign-up) */
.region-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.region-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 40px;
    padding: 8px 11px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.region-chip.wide {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.region-chip:active:not(:disabled) {
    transform: scale(0.96);
}

.region-chip.selected {
    background: linear-gradient(135deg, #ffd23f 0%, #ff7a18 55%, #ff2e63 100%);
    border-color: #fff;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 4px 14px rgba(255, 90, 30, 0.55);
}

.region-chip:disabled {
    opacity: 0.38;
    border-style: dashed;
    cursor: not-allowed;
}

.region-chip-count {
    flex-shrink: 0;
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.region-chip.selected .region-chip-count {
    background: rgba(255, 255, 255, 0.3);
}

/* On the white sign-up card */
.signup-chips .region-chip {
    background: #f1efff;
    border-color: #c9c3ff;
    color: #3b2f8f;
}

.signup-chips.needs-pick .region-chip:not(.selected) {
    border-color: #ff2e63;
}

.signup-chips .region-chip.selected {
    background: linear-gradient(135deg, #ffd23f 0%, #ff7a18 55%, #ff2e63 100%);
    border-color: #ff7a18;
    color: #fff;
}

.auth-container {
    max-height: 94vh;
    overflow-y: auto;
}

/* Check-your-email panel (replaces the tabs and forms after sign-up) */
.signup-done {
    display: none;
    text-align: center;
}

.signup-done-icon {
    font-size: 54px;
    margin-bottom: 8px;
}

.signup-done h3 {
    font-size: 22px;
    color: #667eea;
    margin-bottom: 10px;
}

.signup-done p {
    color: #444;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 22px;
    word-break: break-word;
}

.auth-container.done .auth-tabs,
.auth-container.done .auth-form {
    display: none;
}

.auth-container.done .signup-done {
    display: block;
}

.filter-hint-text {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-style: italic;
    line-height: 1.4;
    padding: 8px 10px 4px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 6px;
}

.filter-item.suggest-event-link {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 10px;
    padding-top: 12px;
    background: rgba(100, 200, 255, 0.2);
    font-weight: 600;
}

.filter-item.suggest-event-link:active {
    background: rgba(100, 200, 255, 0.3);
}

.filter-item.logout-link {
    margin-top: 8px;
    margin-bottom: 0;
    background: rgba(255, 100, 100, 0.2);
    font-weight: 600;
}

.filter-item.logout-link:active {
    background: rgba(255, 100, 100, 0.3);
}

.filter-item.help-link {
    margin-top: 8px;
    margin-bottom: 0;
    background: rgba(255, 210, 70, 0.22);
    font-weight: 600;
}

.filter-item.help-link:active {
    background: rgba(255, 210, 70, 0.34);
}

.filter-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
}

.filter-checkbox.checked {
    background: white;
}

.filter-checkbox.checked::after {
    content: '✓';
    color: #667eea;
    font-size: 14px;
    font-weight: bold;
}

.filter-label {
    color: white;
    font-size: 15px;
    flex: 1;
}

.filter-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    margin-left: 8px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.calendar {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px;
    -webkit-overflow-scrolling: touch;
}

.concert-item {
    background: white;
    border-radius: 15px;
    padding: 10px 12px;
    height: 76px;
    box-sizing: border-box;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 15px;
    cursor: grab;
    transition: transform 0.1s, opacity 0.1s, box-shadow 0.1s;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.concert-item:active {
    cursor: grabbing;
    -webkit-touch-callout: none;
}

.concert-item.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: none;
}

.concert-item.long-pressing {
    transform: scale(0.95);
    opacity: 0.7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.concert-item.flying-left {
    animation: flyLeft 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.concert-item.flying-right {
    animation: flyRight 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes flyLeft {
    to {
        transform: translateX(-150vw) scale(0.8);
        opacity: 0;
    }
}

@keyframes flyRight {
    to {
        transform: translateX(150vw) scale(0.8);
        opacity: 0;
    }
}

/* Animated glow for events already added to Scheduled (gold) or Want to Go (pink) */
.concert-item.glow-active {
    position: relative;
    z-index: 1;
}

.concert-item.glow-active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 17px;
    z-index: -1;
    filter: blur(4px);
    opacity: 0.5;
}

/* Static glow (the old rotating glow flickered because the gradient angle jumped between steps) */
.concert-item.glow-gold::before {
    animation: none;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
}

.concert-item.glow-pink::before {
    animation: none;
    background: linear-gradient(135deg, #FFC0CB, #FF69B4, #FFC0CB);
}


.concert-item .status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.event-info-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: #22c55e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s;
    flex-shrink: 0;
    position: absolute;
    right: 80px;
    bottom: 10px;
    box-sizing: border-box;
}

.event-info-btn:active {
    transform: scale(0.9);
}

.event-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2200;
    padding: 20px;
}

.event-info-overlay.show {
    display: flex;
}

.event-info-box {
    background: white;
    border-radius: 18px;
    padding: 26px;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.event-info-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.event-info-close:hover {
    color: #666;
}

.event-info-box h3 {
    color: #1a1a1a;
    font-size: 20px;
    margin-bottom: 8px;
    padding-right: 20px;
}

.ei-venue-date {
    color: #555;
    font-size: 14px;
    margin-bottom: 4px;
}

.ei-type {
    color: #888;
    font-size: 12px;
    margin-bottom: 14px;
}

.ei-details {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 14px;
    white-space: pre-wrap;
}

.ei-credit {
    color: #888;
    font-size: 11px;
    line-height: 1.4;
    margin: -6px 0 12px;
}

.ei-external-link {
    display: inline-block;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 18px;
}

.ei-external-link:hover {
    text-decoration: underline;
}

.share-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-btn:active {
    transform: scale(0.98);
}

.concert-item.in-scheduled .status-badge {
    display: flex;
    background: #10b981;
}

.concert-item.in-want-to-go .status-badge {
    display: flex;
    background: #f59e0b;
}

.concert-info {
    flex: 1;
    min-width: 0;
    padding-right: 76px; /* the picture sits in the right-hand edge of the card */
}

.concert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
}

/* Cards are three lines: date, event name (one line, full width), venue */
.concert-title {
    font-weight: bold;
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.concert-date {
    font-size: 13px;
    line-height: 1.3;
    color: #666;
    white-space: nowrap;
}

.concert-details {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 38px; /* room for the (i) button that sits beside the picture */
}

.concert-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 72px;
    height: 72px;
    border-radius: 13px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: bold;
    flex-shrink: 0;
    overflow: hidden;
}

.concert-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px;
    pointer-events: none;
}

.swipe-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 999;
    flex-direction: column;
    gap: 2px;
    padding: 4px 15px 7px;
    box-sizing: border-box;
}

.swipe-hint-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.swipe-hint-side {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
}

.swipe-hint-left { text-align: left; }
.swipe-hint-right { text-align: right; }

.swipe-hint-side .hint-arrow {
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    flex-shrink: 0;
}

.swipe-hint-text {
    display: flex;
    align-items: center;
    width: 70%;
    max-width: 320px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    line-height: 1;
}

.swipe-hint-text .hint-arrow {
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
}

/* One solid line joining the two arrows */
.swipe-hint-text .hint-line {
    flex: 1;
    height: 2px;
    margin: 0 -2px;
    border-radius: 1px;
    background: currentColor;
}

.nav-dots {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-top: auto;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
    cursor: pointer;
}

.dot.active {
    background: white;
    width: 30px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Auth Overlay Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.auth-overlay.show {
    display: flex;
}

.auth-container {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #999;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-button:active {
    transform: scale(0.98);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.password-requirements {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* ==================================================================
   THEMES (v1.02): Color | Dark | Grey
   Chosen with the button at the bottom of the filter menu; index.php
   sets <html data-theme="color|dark|grey">.
   COLOR is the original look above (no overrides needed), so any page
   that doesn't set data-theme is unchanged.
   ================================================================== */

/* ---------- Theme toggle button (bottom of filter menu) ---------- */
.theme-toggle-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 11px 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, #ffd166 0%, #f78c6b 100%);
    color: #2a1a40;
}

.theme-toggle-btn:active {
    transform: scale(0.98);
}

/* ==================================================================
   DARK: near-black charcoal, blue/teal accents
   ================================================================== */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .app-wrapper {
    background: #0d1117;
}

html[data-theme="dark"] .container {
    background: transparent;
}

html[data-theme="dark"] .screen-header {
    background: #161b22;
    border: 1px solid #30363d;
    color: #e6edf3;
    backdrop-filter: none;
}

html[data-theme="dark"] .nav-hint {
    color: rgba(230, 237, 243, 0.7);
}

html[data-theme="dark"] .filter-button,
html[data-theme="dark"] .search-button {
    background: #21262d;
    color: #e6edf3;
}

html[data-theme="dark"] .filter-button:active,
html[data-theme="dark"] .filter-button.active,
html[data-theme="dark"] .search-button:active,
html[data-theme="dark"] .search-button.active {
    background: #30363d;
}

/* Filter menu */
html[data-theme="dark"] .filter-menu {
    background: #161b22;
    border: 1px solid #30363d;
    backdrop-filter: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .filter-item {
    background: #21262d;
}

html[data-theme="dark"] .filter-item:active {
    background: #30363d;
}

html[data-theme="dark"] .filter-item.suggest-event-link {
    border-top: 2px solid #30363d;
    background: rgba(47, 129, 247, 0.18);
}

html[data-theme="dark"] .filter-item.logout-link {
    background: rgba(248, 81, 73, 0.18);
}

html[data-theme="dark"] .filter-item.help-link {
    background: rgba(210, 153, 34, 0.2);
}

html[data-theme="dark"] .filter-hint-text {
    color: #8b949e;
    border-top-color: #30363d;
}

html[data-theme="dark"] .empty-state {
    color: #cdd6df;
}

html[data-theme="dark"] .empty-reset {
    background: #21262d;
    color: #58a6ff;
}

html[data-theme="grey"] .empty-reset {
    color: #3a3d42;
}

html[data-theme="dark"] .filter-region-label {
    color: #8b949e;
}

html[data-theme="dark"] .region-chip {
    background: #21262d;
    border-color: #4c5560;
    color: #e6edf3;
}

html[data-theme="dark"] .region-chip.selected {
    background: linear-gradient(135deg, #ffd23f 0%, #ff7a18 55%, #ff2e63 100%);
    border-color: #fff;
    color: #fff;
}

html[data-theme="dark"] .signup-chips .region-chip:not(.selected) {
    background: #21262d;
    border-color: #4c5560;
    color: #e6edf3;
}

html[data-theme="dark"] .signup-done h3 {
    color: #9aa7ff;
}

html[data-theme="dark"] .signup-done p {
    color: #c9d1d9;
}

html[data-theme="dark"] .filter-checkbox {
    border-color: #8b949e;
}

html[data-theme="dark"] .filter-checkbox.checked {
    background: #2f81f7;
    border-color: #2f81f7;
}

html[data-theme="dark"] .filter-checkbox.checked::after {
    color: #ffffff;
}

html[data-theme="dark"] .filter-label {
    color: #e6edf3;
}

html[data-theme="dark"] .filter-color {
    border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .theme-toggle-btn {
    background: linear-gradient(135deg, #00c2a8 0%, #2f81f7 100%);
    color: #04121a;
}

/* Event rows (row backgrounds are darkened per type in index.php) */
html[data-theme="dark"] .concert-item {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .concert-title {
    color: #f0f4f8;
}

html[data-theme="dark"] .concert-date {
    color: #b6c2cf;
}

html[data-theme="dark"] .concert-details {
    color: #cdd6df;
}

html[data-theme="dark"] .concert-icon {
    background: linear-gradient(135deg, #00c2a8 0%, #2f81f7 100%);
}

html[data-theme="dark"] .concert-item.search-active-match {
    box-shadow: 0 0 0 3px #58a6ff, 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Search card */
html[data-theme="dark"] .search-dropdown {
    background: #161b22;
    border: 1px solid #30363d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .search-close {
    color: #8b949e;
}

html[data-theme="dark"] .search-close:hover {
    color: #e6edf3;
}

html[data-theme="dark"] .search-input {
    background: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}

html[data-theme="dark"] .search-input:focus {
    border-color: #2f81f7;
}

html[data-theme="dark"] .search-nav button {
    background: #21262d;
    color: #58a6ff;
}

html[data-theme="dark"] .search-nav button:hover:not(:disabled) {
    background: #30363d;
}

html[data-theme="dark"] .search-count {
    color: #8b949e;
}

/* Event info popup */
html[data-theme="dark"] .event-info-box {
    background: #161b22;
    border: 1px solid #30363d;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .event-info-close {
    color: #8b949e;
}

html[data-theme="dark"] .event-info-close:hover {
    color: #e6edf3;
}

html[data-theme="dark"] .event-info-box h3 {
    color: #f0f4f8;
}

html[data-theme="dark"] .ei-venue-date {
    color: #b6c2cf;
}

html[data-theme="dark"] .ei-type {
    color: #8b949e;
}

html[data-theme="dark"] .ei-details {
    color: #cdd6df;
}

html[data-theme="dark"] .ei-credit {
    color: #8b949e;
}

html[data-theme="dark"] .ei-external-link {
    color: #58a6ff;
}

/* Bottom bar */
html[data-theme="dark"] .swipe-area {
    background: rgba(22, 27, 34, 0.94);
    border-top: 1px solid #30363d;
}

html[data-theme="dark"] .swipe-hint-text {
    color: rgba(230, 237, 243, 0.55);
}

html[data-theme="dark"] .swipe-hint-side {
    color: rgba(230, 237, 243, 0.8);
}

html[data-theme="dark"] .dot {
    background: rgba(230, 237, 243, 0.3);
}

html[data-theme="dark"] .dot.active {
    background: #e6edf3;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* Login / signup */
html[data-theme="dark"] .auth-overlay {
    background: rgba(0, 0, 0, 0.9);
}

html[data-theme="dark"] .auth-container {
    background: #161b22;
    border: 1px solid #30363d;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .auth-header h2 {
    color: #58a6ff;
}

html[data-theme="dark"] .auth-header p {
    color: #8b949e;
}

html[data-theme="dark"] .auth-tabs {
    border-bottom-color: #30363d;
}

html[data-theme="dark"] .auth-tab {
    color: #8b949e;
}

html[data-theme="dark"] .auth-tab.active {
    color: #58a6ff;
    border-bottom-color: #58a6ff;
}

html[data-theme="dark"] .form-group label {
    color: #cdd6df;
}

html[data-theme="dark"] .form-group input {
    background: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}

html[data-theme="dark"] .form-group input:focus {
    border-color: #2f81f7;
}

html[data-theme="dark"] .auth-button {
    background: linear-gradient(135deg, #00c2a8 0%, #2f81f7 100%);
    color: #04121a;
}

html[data-theme="dark"] .password-requirements {
    color: #8b949e;
}

html[data-theme="dark"] .auth-message.success {
    background: rgba(63, 185, 80, 0.18);
    color: #7ee787;
}

html[data-theme="dark"] .auth-message.error {
    background: rgba(248, 81, 73, 0.18);
    color: #ff9b94;
}

/* ==================================================================
   GREY: clean monochrome. Status glows (gold / pink) stay in color so
   Scheduled vs Want to Go is still easy to tell apart.
   ================================================================== */
html[data-theme="grey"],
html[data-theme="grey"] body,
html[data-theme="grey"] .app-wrapper {
    background: linear-gradient(135deg, #d5d7da 0%, #a8acb1 100%);
}

html[data-theme="grey"] .container {
    background: transparent;
}

html[data-theme="grey"] .screen-header {
    background: rgba(48, 50, 54, 0.88);
    color: #f4f5f6;
}

html[data-theme="grey"] .filter-menu {
    background: rgba(38, 40, 44, 0.94);
}

html[data-theme="grey"] .filter-item.suggest-event-link {
    background: rgba(255, 255, 255, 0.16);
}

html[data-theme="grey"] .filter-item.logout-link {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="grey"] .filter-item.help-link {
    background: rgba(255, 255, 255, 0.12);
}

html[data-theme="grey"] .filter-checkbox.checked::after {
    color: #3a3d42;
}

html[data-theme="grey"] .theme-toggle-btn {
    background: #e4e5e7;
    color: #1f2124;
}

/* Event rows (row backgrounds are desaturated per type in index.php) */
html[data-theme="grey"] .concert-icon {
    background: linear-gradient(135deg, #6b6f75 0%, #3a3d42 100%);
    filter: grayscale(1);
}

html[data-theme="grey"] .event-info-btn {
    background: #4b4f55;
}

html[data-theme="grey"] .concert-item.in-scheduled .status-badge {
    background: #3a3d42;
    color: #ffffff;
}

html[data-theme="grey"] .concert-item.in-want-to-go .status-badge {
    background: #7b8087;
    color: #ffffff;
}

html[data-theme="grey"] .concert-item.search-active-match {
    box-shadow: 0 0 0 3px #2b2d31, 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Search card */
html[data-theme="grey"] .search-input:focus {
    border-color: #4b4f55;
}

html[data-theme="grey"] .search-nav button {
    background: #eceded;
    color: #3a3d42;
}

html[data-theme="grey"] .search-nav button:hover:not(:disabled) {
    background: #dcdee0;
}

/* Event info popup */
html[data-theme="grey"] .ei-external-link {
    color: #3a3d42;
}

html[data-theme="grey"] .share-btn {
    background: linear-gradient(135deg, #5a5e64 0%, #34373b 100%);
}

/* Bottom bar */
html[data-theme="grey"] .swipe-area {
    background: rgba(40, 42, 46, 0.62);
}

html[data-theme="grey"] .swipe-hint-text {
    color: rgba(255, 255, 255, 0.75);
}

html[data-theme="grey"] .swipe-hint-side {
    color: rgba(255, 255, 255, 0.9);
}

/* Login / signup */
html[data-theme="grey"] .auth-header h2 {
    color: #3a3d42;
}

html[data-theme="grey"] .auth-tab.active {
    color: #3a3d42;
    border-bottom-color: #3a3d42;
}

html[data-theme="grey"] .form-group input:focus {
    border-color: #4b4f55;
}

html[data-theme="grey"] .auth-button {
    background: linear-gradient(135deg, #5a5e64 0%, #34373b 100%);
}

@media (max-width: 768px) {
    .screen {
        padding: 12px;
        padding-bottom: 0;
    }

    .screen-header {
        padding: 8px 10px;
        margin-bottom: 12px;
    }

    .screen-header h1 {
        font-size: 15px;
    }

    .concert-title {
        font-size: 14px;
    }

    .concert-item {
        padding: 10px 12px;
        gap: 10px;
    }
}

/* In-feed ad card (Calendar screen, logged-in members). Collapsed until Google fills it. */
.sponsor-card {
    height: 0;
    margin: 0;
    padding: 0 8px;
    overflow: hidden;
    opacity: 0;
    box-sizing: border-box;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sponsor-card.filled {
    height: auto;
    min-height: 76px;
    margin: 4px 0 19px;
    padding: 6px 8px 8px;
    opacity: 1;
}

.sponsor-label {
    margin: 0 0 4px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #777;
}

html[data-theme="dark"] .sponsor-card {
    background: #161b22;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .sponsor-label {
    color: #8b949e;
}

/* Own ad campaign cards: same size as an event card */
.sponsor-card.own-ad {
    display: block;
    position: relative;
    height: 76px;
    min-height: 76px;
    margin: 0 0 15px;
    padding: 10px 12px;
    overflow: hidden;
    text-decoration: none;
    color: #1a1a1a;
    background: white;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.own-ad .own-ad-title {
    font-weight: bold;
    font-size: 16px;
    line-height: 1.3;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 30px;
}

.own-ad .own-ad-tagline {
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.own-ad .own-ad-tag {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
}

/* With a background picture: picture fills the card, tag line sits on a dark fade at the bottom */
.sponsor-card.own-ad.has-img {
    --ad-text: #ffffff;
    --tag-left: 12px;
    background-color: #333;
    background-size: contain;
    background-position: 10% center;
    background-repeat: no-repeat;
    padding: 0;
}

/* Tag line over the bottom of the picture (used when the picture fills the whole card) */
.sponsor-card.own-ad.has-img .own-ad-tagline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 12px 8px;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    -webkit-line-clamp: 1;
}

/* Tag line centered in the empty space beside the picture (2 lines) */
.sponsor-card.own-ad.has-img.has-space .own-ad-tagline {
    top: 50%;
    bottom: auto;
    left: var(--tag-left);
    right: 8px;
    padding: 0;
    transform: translateY(-50%);
    text-align: center;
    color: var(--ad-text);
    text-shadow: none;
    background: none;
    -webkit-line-clamp: 2;
    font-size: 14px;
    line-height: 1.3;
}

html[data-theme="dark"] .sponsor-card.own-ad:not(.has-img) {
    background: #161b22;
}

html[data-theme="dark"] .own-ad:not(.has-img) .own-ad-title {
    color: #f0f4f8;
}

html[data-theme="dark"] .own-ad:not(.has-img) .own-ad-tagline {
    color: #9aa4b2;
}

/* Search and menu icons sit toward the center (about 120px from each edge; less on narrow phones so the title keeps room) */
.header-left-group .search-button {
    margin-left: min(68px, calc(50vw - 150px));
}

.header-right-group .filter-button {
    margin-right: min(68px, calc(50vw - 150px));
}

/* Small words beside the header icons (no longer used) */
.hdr-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* The middle column shrinks (long region names get "...") instead of running into the side groups */
.screen-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.screen-header h1 {
    max-width: 100%;
}

@media (max-width: 379px) {
    .hdr-label { display: none; }
}

.header-left-group,
.header-right-group {
    gap: 3px;
}

.screen-header h1 .region-label {
    letter-spacing: 0;
}

/* Close button at the bottom of the filter menu (sticks to the bottom edge while the menu scrolls) */
.filter-close-btn {
    position: sticky;
    bottom: -12px;
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 13px;
    border: 2px solid #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd23f 0%, #ff7a18 55%, #ff2e63 100%);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    box-shadow: 0 -8px 12px -4px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(255, 90, 30, 0.4);
    -webkit-tap-highlight-color: transparent;
}

.filter-close-btn:active {
    transform: scale(0.98);
}

/* Filter menu open: the bottom swipe bar is tucked away so the menu sits on top */
body.menu-open .swipe-area {
    visibility: hidden;
}

/* ...and the screen stops clipping at the old bottom edge, so the whole menu (and Close) is visible */
body.menu-open .screen {
    overflow: visible;
}

/* Event popup: "Learn more" on the left, "EventBeast More" on the right */
.ei-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ei-links .ei-more-link {
    margin-left: auto;
}

/* Login / sign-up box: close button and the reason it opened */
.auth-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.auth-pitch {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.12);
    color: #4a55c4 !important;
    font-weight: 600;
}
