* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root { --primary: #6ee7ff; --secondary: #94a3b8; --accent: #f97316; --success: #22c55e; --danger: #ef4444; --warning: #fb923c; --text: #e2e8f0; --text-light: #94a3b8; --bg: #0f1115; --border: rgba(255,255,255,0.1); }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; word-wrap: break-word; }
input, select, textarea { font-size: 16px; }
.app-header { background: linear-gradient(135deg, #1e40af, #0c4a6e); color: #e2e8f0; padding: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.header-left { display: flex; gap: 1rem; align-items: center; }
.header-right { display: flex; gap: 0.5rem; align-items: center; }
.user-display { color: white; font-size: 0.9rem; }
.stage-mode-btn { background: rgba(255,255,255,0.3); }
.modal-max-width-600 { max-width: 600px; }
.full-width-btn { width: 100%; }
.margin-top-half { margin-top: 0.5rem; }
.margin-top-1 { margin-top: 1rem; }
.margin-bottom-half { margin-bottom: 0.5rem; }
.margin-bottom-1 { margin-bottom: 1rem; }
.font-weight-600 { font-weight: 600; }
.font-size-09 { font-size: 0.9rem; }
.font-size-085 { font-size: 0.85rem; }
.font-weight-normal { font-weight: normal; }
.text-color-gray { color: #6b7280; }
.grid-gap-half { display: grid; gap: 0.5rem; }
.flex-0-auto { flex: 0 0 auto; }
.flex-1 { flex: 1; }
.padding-075 { padding: 0.75rem; }
.border-2-border { border: 2px solid var(--border); }
.border-radius-8 { border-radius: 8px; }
.tap-btn-style { width: 100%; padding: 1rem; font-size: 1rem; font-weight: 700; }
.apply-btn-style { width: 100%; margin-top: 0.5rem; padding: 0.5rem; }
.sort-select-style { max-width: 140px; font-size: 0.9rem; }
.app-header h1 { font-size: 1.5rem; font-weight: 700; }
.icon-btn { background: rgba(255,255,255,0.2); border: none; color: #e2e8f0; font-size: 1.5rem; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; }
.btn-primary { background: var(--success); color: #e2e8f0; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; min-height: 50px; flex: 1; }
.btn-secondary { background: #1a1f2e; color: var(--primary); border: 2px solid var(--primary); padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn-danger { background: white; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #e2e8f0; }
.btn-stop { background: var(--danger); color: #e2e8f0; border: none; padding: 1rem 2rem; border-radius: 12px; font-size: 1.1rem; font-weight: 700; cursor: pointer; min-height: 60px; margin-top: 2rem; }
.setlist-selector, .actions-bar, .search-bar { display: flex; gap: 0.5rem; padding: 1rem; background: #1a1f2e; border-bottom: 1px solid var(--border); }
.setlist-selector select { flex: 1; padding: 0.75rem; border: 2px solid var(--border); border-radius: 8px; }
.actions-bar { flex-wrap: wrap; }
.search-bar input { flex: 1; padding: 0.75rem; border: 2px solid var(--border); border-radius: 8px; }
.search-bar input:focus { outline: none; border-color: var(--primary); }
.main-content { flex: 1; padding: 1rem; max-width: 1200px; width: 100%; margin: 0 auto; padding-bottom: 180px; }
.song-list { display: flex; flex-direction: column; gap: 1rem; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.song-card { background: #1a1f2e; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: move; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, opacity 0.2s ease; -webkit-touch-callout: none; -webkit-user-select: none; -webkit-transform: translateZ(0); -webkit-backface-visibility: hidden; will-change: transform; contain: layout style; touch-action: pan-y; position: relative; }
.song-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-2px); }
.song-card.selected { border: 3px solid var(--primary); }
.song-card.dragging { opacity: 0.8; cursor: grabbing; transform: scale(1.02) rotate(1deg); box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 1000; transition: none; }
.song-card.drag-over { border-top: 3px solid var(--primary); transform: translateY(4px); }
.song-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; gap: 0.5rem; }
.drag-handle { font-size: 1.2rem; color: var(--text-light); cursor: grab; user-select: none; -webkit-user-select: none; line-height: 1; padding: 0.5rem; touch-action: none; -webkit-touch-callout: none; min-width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; position: relative; border-radius: 8px; transition: background 0.2s ease; }
.drag-handle:active { cursor: grabbing; background: rgba(110, 231, 255, 0.1); }
.drag-handle.long-press-active { background: rgba(110, 231, 255, 0.2); animation: pulse-drag 0.6s ease-in-out; }
@keyframes pulse-drag { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.song-position { font-size: 0.9rem; color: var(--text-light); font-weight: 600; }
.song-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }
.song-artist { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.5rem; }
.song-proficiency { font-size: 1rem; margin-bottom: 0.75rem; color: var(--warning); font-weight: 600; }
.song-tuning { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--accent); font-weight: 600; }
.song-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.badge { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.badge-bpm { background: #DBEAFE; color: #1e40af; }
.badge-time { background: #FEF3C7; color: #92400E; }
.badge-key { background: #CFFAFE; color: var(--accent); }
.song-notes { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.75rem; padding: 0.5rem; background: var(--bg); border-radius: 6px; word-wrap: break-word; overflow-wrap: break-word; white-space: pre-wrap; }
.song-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-count-in { background: var(--success); color: #e2e8f0; border: none; padding: 0.54rem 1.09rem; border-radius: 8px; font-size: 0.9rem; font-weight: 700; cursor: pointer; min-height: 43px; flex: 1; }
.btn-practice { background: var(--warning); color: #e2e8f0; border: none; padding: 0.54rem 1.09rem; border-radius: 8px; font-size: 0.9rem; font-weight: 700; cursor: pointer; min-height: 43px; flex: 1; }
.btn-edit { background: rgba(102, 126, 234, 0.1); color: var(--primary); border: 2px solid var(--primary); padding: 0.75rem; border-radius: 8px; font-size: 1.2rem; cursor: pointer; min-height: 60px; min-width: 60px; }
.btn-edit:hover { background: var(--primary); color: #e2e8f0; }
.btn-details { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 2px solid var(--success); padding: 0.75rem; border-radius: 8px; font-size: 1.2rem; cursor: pointer; min-height: 60px; min-width: 60px; }
.btn-details:hover { background: var(--success); color: #e2e8f0; }
.delete-song-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: none; font-size: 1.2rem; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.delete-song-btn:hover { background: var(--danger); color: #e2e8f0; transform: scale(1.1); }
.song-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Band Members Display on Song Cards */
.band-members-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.band-member-chip { display: inline-flex; align-items: center; gap: 0.41rem; padding: 0.41rem 0.89rem; background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.2); border-radius: 20px; font-size: 1rem; font-weight: 500; color: var(--text); transition: all 0.2s; }
.band-member-chip:hover { background: rgba(37, 99, 235, 0.12); border-color: rgba(37, 99, 235, 0.3); transform: translateY(-1px); }
.band-member-emoji { font-size: 1.18rem; line-height: 1; }
.band-member-name { line-height: 1; }

/* Song Card Annotations Display */
.song-annotations { background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(6, 182, 212, 0.05)); border: 1px solid rgba(37, 99, 235, 0.15); border-radius: 8px; padding: 0.75rem; margin-bottom: 0.75rem; }
.song-annotations-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.annotations-icon { font-size: 1rem; }
.annotations-label { font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.song-annotations-list { display: flex; flex-direction: column; gap: 0.35rem; }
.song-annotation-item { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.85rem; color: white; line-height: 1.4; }
.annotation-bullet { font-weight: 600; color: var(--primary); min-width: 20px; }
.annotation-text-display { flex: 1; color: white; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-light); }
.count-in-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.count-in-content { text-align: center; color: #e2e8f0; padding: 2rem; max-width: 600px; width: 100%; }
.metronome-controls { background: rgba(255,255,255,0.1); padding: 1rem; border-radius: 12px; margin-bottom: 1.5rem; }
.tempo-control input[type="range"] { -webkit-appearance: none; appearance: none; height: 8px; background: rgba(255,255,255,0.3); border-radius: 5px; outline: none; }
.tempo-control input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; background: var(--success); border-radius: 50%; cursor: pointer; }
.tempo-control input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; background: var(--success); border-radius: 50%; cursor: pointer; border: none; }
.bar-counter { font-size: 1.2rem; margin-bottom: 1rem; opacity: 0.8; }
.beat-indicator { font-size: 4rem; margin: 1rem 0; animation: pulse 0.3s ease-out; }
.beat-number { font-size: 8rem; font-weight: 900; line-height: 1; margin: 1rem 0; }
.song-info .song-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.song-info .song-meta { font-size: 1.2rem; opacity: 0.8; }
@keyframes pulse { 0% { transform: scale(0.8); opacity: 0; } 50% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-content { background: #1a1f2e; border-radius: 12px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); }
.modal-body { padding: 1rem; }
.close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.tap-tempo-modal { max-width: 400px; }
.btn-tap-tempo { background: linear-gradient(135deg, #1e40af, #0c4a6e); color: #e2e8f0; border: none; padding: 3rem; border-radius: 50%; font-size: 1.5rem; font-weight: 700; cursor: pointer; width: 200px; height: 200px; margin: 2rem auto; display: block; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4); transition: all 0.1s; }
.btn-tap-tempo:active { transform: scale(0.95); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.6); }
.tap-tempo-display { text-align: center; font-size: 1.5rem; font-weight: 700; padding: 1rem; margin: 1rem 0; border-radius: 8px; background: var(--bg); min-height: 60px; display: flex; align-items: center; justify-content: center; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem; border: 2px solid var(--border); border-radius: 8px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.setting-group { margin-bottom: 1.5rem; }
.setting-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }

/* Time Signature Sections */
.time-sig-section { background: var(--bg); padding: 0.75rem; border-radius: 8px; margin-bottom: 0.5rem; display: flex; gap: 0.5rem; align-items: center; }
.time-sig-section select { flex: 1; padding: 0.5rem; border: 2px solid var(--border); border-radius: 6px; }
.time-sig-section input { width: 80px; padding: 0.5rem; border: 2px solid var(--border); border-radius: 6px; }
.time-sig-section button { background: var(--danger); color: white; border: none; padding: 0.5rem; border-radius: 6px; cursor: pointer; min-width: 40px; }
.time-sig-section-label { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.25rem; }

/* Band Members Management */
.band-member-item { background: var(--bg); padding: 0.75rem; border-radius: 8px; margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.band-member-name { font-weight: 600; font-size: 1rem; color: var(--text); }
.band-member-role { font-size: 0.85rem; color: var(--text-light); margin-top: 0.25rem; }
.delete-member-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: none; font-size: 1rem; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; }
.delete-member-btn:hover { background: var(--danger); color: #e2e8f0; }
.band-member-form { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.band-member-form input { flex: 2; min-width: 150px; }
.band-member-form select { flex: 1; min-width: 120px; }

/* Song Details Modal */
.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 0.75rem; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }
.detail-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 600; color: var(--text-light); }
.detail-value { color: var(--text); text-align: right; }

/* View Tabs */
.view-tabs { display: flex; gap: 0; background: #1a1f2e; border-bottom: 2px solid var(--border); padding: 0 1rem; }
.view-tab { background: transparent; border: none; padding: 1rem 1.5rem; font-size: 1rem; font-weight: 600; color: var(--text-light); cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; }
.view-tab:hover { color: var(--primary); background: rgba(37, 99, 235, 0.05); }
.view-tab.tab-active { color: var(--primary); border-bottom-color: var(--primary); }
.view-container { display: block; }

/* Song Bank */
.song-bank-controls { display: flex; gap: 0.5rem; padding: 1rem; background: #1a1f2e; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.song-bank-controls select { flex: 1; min-width: 200px; padding: 0.75rem; border: 2px solid var(--border); border-radius: 8px; }
.song-bank-card { background: #1a1f2e; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: all 0.2s; margin-bottom: 1rem; }
.song-bank-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-2px); }
.vote-score { font-size: 1.5rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 20px; background: var(--bg); }
.vote-positive { color: var(--success); background: #D1FAE5; }
.vote-negative { color: var(--danger); background: #FEE2E2; }
.song-bank-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.vote-buttons { display: flex; gap: 0.5rem; flex: 1; }
.btn-vote { background: #1a1f2e; border: 2px solid var(--border); padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; flex: 1; min-height: 44px; }
.btn-upvote:hover { border-color: var(--success); color: var(--success); background: rgba(16, 185, 129, 0.1); }
.btn-downvote:hover { border-color: var(--danger); color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.btn-upvote.vote-active { border-color: var(--success); color: #e2e8f0; background: var(--success); }
.btn-downvote.vote-active { border-color: var(--danger); color: #e2e8f0; background: var(--danger); }
.btn-promote { background: var(--success); color: #e2e8f0; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; flex: 2; min-height: 50px; }
.btn-promote:hover { background: #059669; }
.delete-bank-song-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: none; font-size: 1.2rem; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.delete-bank-song-btn:hover { background: var(--danger); color: #e2e8f0; transform: scale(1.1); }

.detail-notes { background: var(--bg); padding: 1rem; border-radius: 8px; color: var(--text); white-space: pre-wrap; }

/* Set Break Dividers */
.set-break-divider { background: linear-gradient(135deg, #1e40af, #0c4a6e); color: #e2e8f0; border-radius: 12px; padding: 1rem; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); cursor: move; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, opacity 0.2s ease; margin-bottom: 1rem; -webkit-touch-callout: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-transform: translateZ(0); -webkit-backface-visibility: hidden; will-change: transform; touch-action: pan-y; }
.set-break-divider:hover { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4); transform: translateY(-2px); }
.set-break-divider.dragging { opacity: 0.8; cursor: grabbing; transform: scale(1.02) rotate(1deg); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5); z-index: 1000; transition: none; }
.set-break-divider.drag-over { border-top: 3px solid white; transform: translateY(4px); }
.set-break-line { display: flex; align-items: center; gap: 1rem; }
.set-break-line .drag-handle { cursor: grab; }
.set-break-line .drag-handle:active { cursor: grabbing; }
.set-break-content { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.set-break-label { font-size: 1.25rem; font-weight: 700; }
.set-break-duration { font-size: 0.9rem; opacity: 0.9; }
.set-break-divider .drag-handle { color: rgba(255, 255, 255, 0.9); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none; }
.set-break-divider .icon-btn { background: rgba(255, 255, 255, 0.2); color: #e2e8f0; }
.set-break-divider .icon-btn:hover { background: var(--danger); }
.btn-edit-break { background: rgba(255, 255, 255, 0.2); color: #e2e8f0; border: none; font-size: 1.2rem; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; }
.btn-edit-break:hover { background: rgba(255, 255, 255, 0.3); }

/* Annotation Lines in Edit Modal */
.annotation-item { background: var(--bg); border: 2px solid var(--border); border-radius: 8px; padding: 0.75rem; margin-bottom: 0.75rem; transition: all 0.2s; }
.annotation-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1); }
.annotation-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.annotation-item-number { font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.delete-annotation-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: none; width: 28px; height: 28px; border-radius: 6px; font-size: 1rem; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.delete-annotation-btn:hover { background: var(--danger); color: #e2e8f0; transform: scale(1.1); }
.annotation-item-input { width: 100%; padding: 0.5rem 0.75rem; border: 2px solid var(--border); border-radius: 6px; font-size: 0.9rem; transition: border-color 0.2s; }
.annotation-item-input:focus { outline: none; border-color: var(--primary); }
.annotation-item-input::placeholder { color: #9ca3af; }
#editAnnotationLines { max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#editAnnotationLines::-webkit-scrollbar { width: 8px; }
#editAnnotationLines::-webkit-scrollbar-track { background: var(--bg); border-radius: 4px; }
#editAnnotationLines::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
#editAnnotationLines::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* Band Members on Card */
.song-band-members { font-size: 1rem; color: white; margin-top: 0.5rem; padding: 0.5rem; background: rgba(103, 126, 234, 0.05); border-radius: 6px; line-height: 1.4; }

/* Annotation Lines - Simplified */
.annotation-line-container { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; margin-top: 0.75rem; }
.annotation-controls { margin-bottom: 0.5rem; }
.btn-add-line { background: rgba(37, 99, 235, 0.1); color: var(--primary); border: 2px solid var(--primary); padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-add-line:hover { background: var(--primary); color: #e2e8f0; }
.annotation-line { background: #1a1f2e; border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.annotation-line:last-child { margin-bottom: 0; }
.annotation-text { flex: 1; border: 1px solid var(--border); background: #1a1f2e; font-size: 0.9rem; padding: 0.5rem; border-radius: 4px; color: white; }
.annotation-text:focus { outline: none; border-color: var(--primary); }
.line-delete-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: none; width: 28px; height: 28px; border-radius: 4px; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.line-delete-btn:hover { background: var(--danger); color: #e2e8f0; transform: scale(1.1); }

/* Practice Modal Styles */
.practice-song-info { text-align: center; margin-bottom: 1.5rem; }
.practice-song-name { margin: 0; font-size: 1.5rem; color: var(--text); }
.practice-song-meta { margin: 0.5rem 0 0 0; color: var(--text-light); }
.practice-music-container { display: none; margin-bottom: 1.5rem; }
.practice-music-link { display: inline-block; margin-top: 0.5rem; padding: 0.5rem 1rem; background: #1DB954; color: white; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.practice-controls { background: rgba(255,255,255,0.05); padding: 1rem; border-radius: 12px; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.1); }
.practice-control-group { margin-bottom: 1rem; }
.practice-control-group:last-child { margin-bottom: 0; }
.practice-control-label { font-size: 0.9rem; margin-bottom: 0.5rem; display: block; font-weight: 600; color: var(--text); }
.practice-control-value { color: var(--primary); }
.practice-control-slider { width: 100%; }
.practice-display-area { text-align: center; }
.practice-bar-counter { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; color: #667eea; }
.practice-beat-display { font-size: 4rem; font-weight: bold; margin: 1rem 0; color: #667eea; }
.practice-btn-start { width: 100%; padding: 1rem; font-size: 1.1rem; margin-bottom: 0.5rem; }
.practice-btn-stop { width: 100%; padding: 1rem; font-size: 1.1rem; display: none; }

/* Screen reader only class for accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Prevent text selection on draggable elements */
.song-card[draggable="true"], .set-break-divider[draggable="true"] { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.dragging * { -webkit-user-select: none !important; -moz-user-select: none !important; -ms-user-select: none !important; user-select: none !important; }

/* Focus styles for accessibility */
button:focus, input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* High contrast mode support */
@media (prefers-contrast: high) { :root { --border: #000000; --text-light: #000000; } }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

/* Landscape mode optimizations for iPad/iPhone */
@media (orientation: landscape) and (max-height: 500px) {
  .main-content { padding-bottom: 100px; }
  .song-card { padding: 0.75rem; }
  .drag-handle { min-width: 44px; min-height: 44px; }
  .modal-content { max-height: 85vh; }
}

/* Header Dropdown Menu */
.header-menu-container { position: relative; }
.header-dropdown { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; background: #1a1f2e; border: 2px solid var(--border); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); min-width: 200px; z-index: 3000; }
.dropdown-item { width: 100%; background: none; border: none; padding: 0.75rem 1rem; text-align: left; color: var(--text); font-size: 1rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: background 0.2s; border-bottom: 1px solid var(--border); }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: rgba(103, 126, 234, 0.1); }
.dropdown-item.logout-item { color: var(--danger); }
.dropdown-item.logout-item:hover { background: rgba(239, 68, 68, 0.1); }
.dropdown-icon { font-size: 1.2rem; width: 24px; text-align: center; }

/* Portrait mode fixes for iPhone */
@media (max-width: 480px) and (orientation: portrait) {
  .modal { padding: 0.5rem; align-items: flex-start; padding-top: 1rem; }
  .modal-content { max-height: 95vh; margin: 0; }
  .modal-body { padding: 0.75rem; }
  .form-group { margin-bottom: 0.75rem; }
}

@media (max-width: 480px) { .app-header h1 { font-size: 1.25rem; } .btn-count-in { font-size: 0.9rem; } .beat-number { font-size: 6rem; } }

/* Toast Notifications */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 400px; pointer-events: none; }
.toast { background: #1a1f2e; border-radius: 8px; padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 0.75rem; opacity: 0; transform: translateX(400px); transition: all 0.3s ease; pointer-events: auto; border-left: 4px solid var(--primary); }
.toast-show { opacity: 1; transform: translateX(0); }
.toast-hide { opacity: 0; transform: translateX(400px); }
.toast-icon { font-size: 1.5rem; font-weight: bold; flex-shrink: 0; }
.toast-message { flex: 1; font-size: 0.95rem; color: var(--text); word-wrap: break-word; }
.toast-close { background: none; border: none; font-size: 1.2rem; color: var(--text-light); cursor: pointer; padding: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all 0.2s; }
.toast-close:hover { background: var(--bg); color: var(--text); }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info { border-left-color: var(--primary); }
.toast-info .toast-icon { color: var(--primary); }

/* Confirmation Dialog */
.confirm-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; transition: opacity 0.2s ease; }
.confirm-overlay.confirm-show { opacity: 1; }
.confirm-dialog { background: #1a1f2e; border-radius: 12px; padding: 1.5rem; max-width: 400px; width: 100%; box-shadow: 0 8px 24px rgba(0,0,0,0.2); transform: scale(0.9); transition: transform 0.2s ease; }
.confirm-overlay.confirm-show .confirm-dialog { transform: scale(1); }
.confirm-message { font-size: 1rem; color: var(--text); margin-bottom: 1.5rem; line-height: 1.5; }
.confirm-buttons { display: flex; gap: 0.75rem; justify-content: flex-end; }
.btn-confirm-cancel { background: #1a1f2e; color: var(--text-light); border: 2px solid var(--border); padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-confirm-cancel:hover { background: var(--bg); border-color: var(--text-light); }
.btn-confirm-ok { background: var(--primary); color: #e2e8f0; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-confirm-ok:hover { background: #1d4ed8; }
.prompt-input { width: 100%; padding: 0.75rem; border: 2px solid var(--border); border-radius: 8px; font-size: 1rem; margin-bottom: 1rem; }
.prompt-input:focus { outline: none; border-color: var(--primary); }

@media (max-width: 480px) { .toast-container { right: 10px; left: 10px; max-width: none; } .toast { padding: 0.75rem; } }

/* Sync Status & Offline Indicator */
.sync-status {
    font-size: 1.2rem;
    margin-left: 0.5rem;
    cursor: help;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.offline-indicator {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

/* Band Switcher */
.band-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0.75rem;
}

.band-dropdown {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.2s;
}

.band-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.15);
}

.band-dropdown option {
    background: #1a1f2e;
    color: white;
}

.create-band-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-band-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}



/* Band Management Modal */
.band-management-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.band-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.band-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.band-item.active-band {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.05);
}

.band-info {
    flex: 1;
}

.band-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.band-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.band-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-switch-band {
    background: var(--primary);
    color: #e2e8f0;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-switch-band:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-leave-band {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 2px solid var(--danger);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-leave-band:hover {
    background: var(--danger);
    color: #e2e8f0;
    transform: translateY(-1px);
}

.band-members-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.band-members-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-item {
    background: #1a1f2e;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-name {
    font-weight: 600;
    color: var(--text);
}

.member-status {
    background: var(--success);
    color: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
