body { 
    font-family: -apple-system, system-ui, sans-serif; 
    margin: 0; padding: 2px;
    background-color: #000000;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    overflow-y: auto;   /* Allow vertical scrolling */
    touch-action: pan-y; /* Disable pinch-to-zoom and horizontal gestures */
}
.container {
    width: 100%; margin: auto; padding: 0 10px 60px; box-sizing: border-box; 
    overflow-y: visible;
}
.header-main {
    display: flex; justify-content: flex-end; align-items: center; padding: 15px 20px; position: relative;
}
.user-greeting {
    font-size: 0.85em; color: #888; font-weight: 500; z-index: 10;
}
.notification-bell {
    background: none !important; border: none !important; font-size: 1.5em !important;
    color: #fff !important; padding: 0 !important; margin-right: 15px !important;
    width: auto !important; cursor: pointer; box-shadow: none !important;
    z-index: 10;
}
.menu-container {
    position: relative; z-index: 10;
}
.hamburger-btn {
    background: none !important; border: none !important; font-size: 1.8em !important; 
    color: #fff !important; padding: 0 !important; margin: 0 !important; 
    width: auto !important; cursor: pointer; box-shadow: none !important;
}
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 40px; 
    background: #2c2c2c; border: 1px solid #444; border-radius: 8px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.6); min-width: 140px; overflow: hidden;
}
.dropdown-menu.show {
    display: block;
}
.dropdown-menu a {
    display: block; color: #fff; padding: 12px 16px; text-decoration: none; 
    font-size: 0.95em; transition: background 0.2s;
}
.dropdown-menu a:hover {
    background: #ff5252; color: white;
}

/* Gig Menu (Hamburger next to title) */
.sheet-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 15px;
    padding: 0 40px; /* Space for the absolute menu button */
}
.gig-menu-container {
    position: absolute;
    right: 10px; 
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}
.gig-menu-btn {
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 1.6em !important;
    cursor: pointer;
    padding: 5px !important;
    width: auto !important;
    box-shadow: none !important;
    margin: 0 !important;
}
.gig-dropdown-menu { display: none; position: absolute; right: 0; top: 35px; background: #2c2c2c; border: 1px solid #444; border-radius: 8px; box-shadow: 0 8px 25px rgba(0,0,0,0.6); min-width: 140px; z-index: 100; overflow: hidden; }
.gig-dropdown-menu.show { display: block; }
.gig-dropdown-menu a { display: block; color: #fff; padding: 12px 16px; text-decoration: none; font-size: 0.9em; text-align: left; transition: background 0.2s; }
.gig-dropdown-menu a:hover { background: #383838; }

h1 { text-align: center; color: #ffffff; margin-bottom: 30px; }
.card { background: #1e1e1e; padding: 10px; border-radius: 10px; border: 1px solid #333; box-shadow: 0 10px 30px rgba(0,0,0,0.5); margin-bottom: 10px; text-align: center; }
input, select, button { width: 100%; padding: 14px; margin: 10px 0; border: 1px solid #333; border-radius: 10px; font-size: 16px; box-sizing: border-box; background: #2c2c2c; color: #fff; }
button { background-color: #406cab; color: white; border: none; font-weight: 600; cursor: pointer; }
button:active { transform: scale(0.98); }
.gig-item { padding: 20px 0; position: relative; }
.sheet-title { font-weight: 800; font-size: 1.8em; color: #ffffff; text-align: center; margin-bottom: 0 !important; display: block; line-height: 1.2; flex: 1; }
.flyer-container {
    width: 100%;
    aspect-ratio: 1 / 1.4;
    background-color: #252525;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}
.flyer-img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    display: block; 
    margin: 0; 
}
.flyer-placeholder-text {
    color: #444;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.external-link { text-align: center; display: block; margin-top: 10px; color: #0d6efd; text-decoration: none; font-size: 1.1em; font-weight: 500; }
.header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; }
.sheet-section { margin-top: 20px; }
.gig-main-content { display: flex; gap: 12px; align-items: flex-start; flex-direction: column; align-items: center; gap: 20px; }
.flyer-col { flex: 0 0 50%; position: relative; width: 100%; max-width: 500px; }
.info-col { flex: 1; min-width: 0; width: 100%; text-align: left; max-width: 500px; }
.date-display { font-size: 1.5em; font-weight: 700; color: #ffffff; margin-top: 0; text-align: left; word-wrap: break-word; }
.attribute-row { margin-bottom: 12px; font-size: 1.3em; color: #bbbbbb; }
.attribute-label { font-weight: 600; color: #ffffff; margin-right: 5px; }
.upload-btn { position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%); width: auto; margin: 0; padding: 8px 16px; font-size: 0.85em; background-color: rgba(64, 108, 171, 0.9); color: white; border-radius: 5px; border: none; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.upload-btn.update-mode { background-color: transparent; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.3); }
.upload-btn:active { transform: translateX(-50%) scale(0.98); }
.header-logo-img {
    width: 100%;
    max-width: 200px; /* Adjust as needed */
    height: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

/* Tabs Styling */
 .tab-container { display: flex; gap: 10px; margin-bottom: 20px; justify-content: center; position: relative; z-index: 1; }
.tab-btn { background: #2c2c2c; border: 1px solid #333; color: #888; padding: 2px; border-radius: 10px; cursor: pointer; flex: 1; max-width: 200px; font-weight: 600; transition: all 0.2s; }
.tab-btn.active { background: #406cab; color: white; border-color: #406cab; }
.tab-pane { display: none; padding-bottom: 40px; }
.tab-pane.active { display: block; }

/* Show Event Tabs (horizontal navigation for specific shows) */
.show-tabs-nav {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 15px;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
}
.show-tabs-nav::-webkit-scrollbar { display: none; } /* Hide scrollbar Chrome/Safari */

.show-tab-item {
    background: #2c2c2c; border: 1px solid #333; color: #888; padding: 10px 18px; 
    border-radius: 8px; cursor: pointer; white-space: nowrap; font-size: 0.9em; flex-shrink: 0; font-weight: 600;
}
.show-tab-item.active { background: #406cab; color: white; border-color: #406cab; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

/* Inner Tabs Styling */
.inner-tabs { display: flex; border-bottom: 1px solid #333; margin-bottom: 15px; width: 100%; }
.inner-tab-btn { background: none; border: none; color: #888; padding: 10px 15px; cursor: pointer; font-size: 0.9em; font-weight: 600; border-bottom: 2px solid transparent; flex: 1; margin: 0; transition: all 0.2s; }
.inner-tab-btn.active { color: #406cab; border-bottom: 2px solid #406cab; }
.sub-tab-pane { display: none; width: 100%; min-height: 100px; }
.sub-tab-pane.active { display: block; }

/* Setlist Builder Styles */
.setlist-wrapper { display: flex; gap: 20px; margin-top: 15px; align-items: flex-start; }
.setlist-builder { flex: 1.2; display: flex; flex-direction: column; gap: 5px; background: #181818; padding: 15px; border-radius: 10px; border: 1px solid #333; min-height: 200px; }
.song-pool { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding: 15px; background: #1e1e1e; border-radius: 10px; border: 1px solid #333; max-height: 500px; overflow-y: auto; }

.song-bubble { 
    background: #333; border: 1px solid #444; color: #efefef; padding: 8px 16px; border-radius: 20px; 
    cursor: grab; font-size: 0.9em; transition: all 0.2s; user-select: none; white-space: nowrap;
}
.song-bubble:hover { background: #406cab; border-color: #5a8bd4; transform: translateY(-2px); }
.song-bubble.selected { 
    background: #406cab; 
    border-color: #5a8bd4; 
    color: white;
}
.song-bubble:active { cursor: grabbing; }

.drop-hole { 
    height: 30px; border-radius: 4px; transition: background-color 0.2s; margin: -9px 0;
    display: flex; align-items: center; justify-content: center; color: transparent; font-size: 0.8em;
}
.drop-hole.drag-over { background-color: #406cab !important; color: transparent !important; border: none !important; }
.drop-hole.empty-list { height: 120px; border: 2px dashed #333; color: #555; margin: 10px 0; }

.setlist-item { 
    background: #2c2c2c; border: 1px solid #406cab; color: white; padding: 12px 18px; border-radius: 8px; 
    display: flex; justify-content: center; align-items: center; font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); animation: fadeIn 0.3s ease-out; cursor: grab;
}
.setlist-item.is-note {
    font-style: italic;
    border-color: #555;
    background: #222;
    color: #888;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Static Setlist Styles */
.static-setlist { background: #181818; padding: 20px; border-radius: 10px; border: 1px solid #333; margin-bottom: 15px; }
.static-song { font-size: 1.1em; padding: 10px 0; border-bottom: 1px solid #252525; display: flex; align-items: center; }
.static-song:last-child { border-bottom: none; }
.song-number { color: #406cab; font-weight: 800; margin-right: 15px; width: 20px; font-size: 0.9em; }

@media (max-width: 768px) {
    .setlist-wrapper { flex-direction: column-reverse; }
    .song-pool { width: 100%; box-sizing: border-box; }
}

#gig-list {
    text-align: center;
}

.editable-gig-value {
    cursor: pointer;
    user-select: none;
    padding: 6px 10px;
    margin: -6px -10px;
    display: inline-block;
    vertical-align: middle;
    border-radius: 4px;
    transition: background 0.2s;
}
.editable-gig-value:hover { background: rgba(255, 255, 255, 0.08); }

/* Grid layout for Task Cards */
.task-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* gap: 15px; Removed as swipe-container now has margin-bottom */
    margin-top: 20px;
}

/* Swipe to delete styles */
.swipe-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background-color: #ff5252; /* Reveal red background on swipe */
    margin-bottom: 15px; /* Add spacing between cards */
}
.swipe-content {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}
.delete-action-btn {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 80px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 24px; font-weight: bold; cursor: pointer;
    z-index: 1;
}

/* Toast / Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 400px;
    pointer-events: none;
}
.toast {
    background: #2c2c2c;
    color: white;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 1px solid #444;
    font-size: 0.95em;
    font-weight: 500;
}
.toast.error { border-left: 4px solid #ff5252; }
.toast.success { border-left: 4px solid #28a745; }
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #406cab;
    width: 100%;
    animation: progress 5s linear forwards;
}
@keyframes slideDown { from { transform: translateY(-120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-120%); opacity: 0; } }

.toast.hiding {
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes progress { from { width: 100%; } to { width: 0%; } }

/* Single Release Progress View */
.release-card {
    text-align: left;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 20px;
}
.release-card:hover { background-color: #252525; }
.release-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.release-title { margin: 0; color: #406cab; font-size: 1.4em; }
.release-date { margin: 4px 0 0 0; color: #888; font-size: 0.9em; }
.progress-container {
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}
.progress-percent { font-weight: 800; color: #28a745; font-size: 1.1em; }
.expand-hint {
    font-size: 0.75em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    display: block;
}
.release-tasks-container { display: none; margin-top: 20px; padding-top: 20px; border-top: 1px solid #333; }
.release-tasks-container.show { display: block; }

/* Modal System for Event Creator */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

#createEventCard {
    width: 90%;
    max-width: 450px;
    border: 1px solid #406cab;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    text-align: left;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.75em;
    color: #406cab;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

/* Standardize date and time inputs for mobile browsers */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 46px; /* Matches height of text inputs with 14px padding */
}

/* Poll Styles */
.poll-option-row {
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    background: #252525;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #333;
    transition: border-color 0.2s, background-color 0.2s, transform 0.1s;
}
.poll-option-row:active { transform: scale(0.98); background-color: #333; }
.poll-option-bg {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: rgba(241, 196, 15, 0.2);
    transition: width 0.4s ease;
    z-index: 1;
}
.poll-option-content {
    position: relative;
    z-index: 2;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
}
.poll-voters { font-size: 0.75em; color: #888; margin-top: -8px; margin-bottom: 10px; padding-left: 5px; }

/* Linktree Page Styles */
.links-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.link-btn-item {
    transition: transform 0.1s ease;
}
.link-btn-item:active { transform: scale(0.97); }

/* Link Editor Drag & Drop */
.link-edit-row.drag-over {
    border: 1px dashed #406cab !important;
    background: #1a1a1a !important;
}
.link-edit-row:active {
    cursor: grabbing;
}

/* Practice Scheduler Styles */
.practice-block-row {
    display: flex; gap: 10px; margin-bottom: 12px; align-items: center; 
    background: #252525; padding: 12px; border-radius: 10px; border: 1px solid #333; cursor: grab;
}
.practice-block-row.drag-over { border: 1px dashed #406cab !important; background: #1a1a1a !important; }

.practice-progress-container {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 50px; 
    background: #000; z-index: 10001; border-bottom: 3px solid #406cab; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    box-sizing: border-box;
}
.practice-progress-container.fullscreen {
    height: 100vh;
    border-bottom: none;
}
.practice-progress-container.fullscreen .practice-progress-info {
    flex-direction: column;
    justify-content: center;
    gap: 40px;
}
.practice-progress-container.fullscreen #active-block-name {
    font-size: 3.5em;
    text-align: center;
}
.practice-progress-container.fullscreen .block-time-display {
    font-size: 7em;
    padding: 20px 40px;
}
.upcoming-blocks-list {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.practice-progress-container.fullscreen .upcoming-blocks-list {
    display: flex;
}
.upcoming-block-item {
    font-size: 1.4em;
    color: #666;
    font-weight: 500;
}
.upcoming-block-duration {
    font-size: 0.75em;
    color: #444;
    margin-left: 10px;
}
.total-practice-remaining {
    display: none;
    font-size: 1.2em;
    color: #444;
    font-weight: 600;
}
.practice-progress-container.fullscreen .total-practice-remaining {
    display: block;
}
.practice-minimize-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: auto !important;
    padding: 8px 12px !important;
    font-size: 1.1em !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid #444 !important;
    pointer-events: auto;
    z-index: 10002;
}
.practice-progress-fill {
    height: 100%; width: 0%; background: linear-gradient(90deg, #406cab, #5a8bd4); 
    transition: width 1s linear;
}
.practice-progress-info {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0 20px; box-sizing: border-box; font-weight: 800; color: white;
    pointer-events: none;
}
.block-time-display {
    font-family: monospace;
    font-size: 1.2em;
    color: #406cab;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Toggle Switch Styles for Link Editor Menu */
.switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444;
    transition: .3s;
    border-radius: 18px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 12px; width: 12px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #28a745; }
input:checked + .slider:before { transform: translateX(14px); }