/* ============================================
   BUSKERCHORD - COMPLETE STYLES
   ============================================ */

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #0f0f1a;
  color: #ffffff;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f0f1a;
}

::-webkit-scrollbar-thumb {
  background: #ffcc00;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff8800;
}

/* ============================================
   INDEX PAGE
   ============================================ */
.index-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(145deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
  padding: 20px;
  overflow-y: auto;
}

.index-card {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 50px 45px;
  max-width: 520px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: transform 0.3s ease;
}

.index-card:hover {
  transform: translateY(-4px);
}

.index-header {
  margin-bottom: 10px;
}

.index-icon-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.index-header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -1px;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.index-header h1 .color-asli {
  background: linear-gradient(135deg, #ffcc00 0%, #f5a623 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.index-header h1 .color-busker {
  background: linear-gradient(135deg, #ff8800 0%, #e65c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.index-header h1 .color-chords {
  background: linear-gradient(135deg, #ff4400 0%, #cc0000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.index-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  margin-top: 4px;
  font-family: Arial, sans-serif;
  letter-spacing: 0.5px;
}

.logout-btn-index {
  background: #4a2a2a;
  border: 1px solid #ff4444;
  color: white;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: Arial, sans-serif;
  margin-top: 12px;
  transition: background 0.2s;
}

.logout-btn-index:hover {
  background: #5a3a3a;
}

.index-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #ffcc00, #ff8800);
  border-radius: 10px;
  margin: 20px auto 30px;
}

.index-divider-light {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0 16px 0;
}

.index-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.index-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.index-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.index-btn:hover::before {
  opacity: 1;
}

.index-btn:active {
  transform: scale(0.97);
}

.index-btn-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.index-btn-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.index-btn-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.index-btn-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: Arial, sans-serif;
}

.index-btn-arrow {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.index-btn:hover .index-btn-arrow {
  color: #fff;
  transform: translateX(4px);
}

/* Button Colors */
.leadsheet-viewer-btn {
  background: linear-gradient(135deg, #1a3a3e, #2a5a6e) !important;
  border: 1px solid rgba(58, 142, 158, 0.4) !important;
}

.leadsheet-viewer-btn .index-btn-icon {
  background: rgba(58, 142, 158, 0.3) !important;
}

.leadsheet-viewer-btn:hover {
  border-color: rgba(58, 142, 158, 0.8) !important;
  box-shadow: 0 8px 30px rgba(58, 142, 158, 0.3) !important;
}

.leadsheet-admin-btn {
  background: linear-gradient(135deg, #2a1a4e, #4a2a7e) !important;
  border: 1px solid rgba(108, 58, 142, 0.4) !important;
}

.leadsheet-admin-btn .index-btn-icon {
  background: rgba(108, 58, 142, 0.3) !important;
}

.leadsheet-admin-btn:hover {
  border-color: rgba(108, 58, 142, 0.8) !important;
  box-shadow: 0 8px 30px rgba(108, 58, 142, 0.3) !important;
}

.viewer-btn {
  background: linear-gradient(135deg, #1a2a4e, #2a4a6e) !important;
  border: 1px solid rgba(58, 106, 142, 0.4) !important;
}

.viewer-btn .index-btn-icon {
  background: rgba(58, 106, 142, 0.3) !important;
}

.viewer-btn:hover {
  border-color: rgba(58, 106, 142, 0.8) !important;
  box-shadow: 0 8px 30px rgba(58, 106, 142, 0.3) !important;
}

.admin-btn {
  background: linear-gradient(135deg, #2a1a4e, #3a2a6e) !important;
  border: 1px solid rgba(74, 58, 142, 0.4) !important;
}

.admin-btn .index-btn-icon {
  background: rgba(74, 58, 142, 0.3) !important;
}

.admin-btn:hover {
  border-color: rgba(74, 58, 142, 0.8) !important;
  box-shadow: 0 8px 30px rgba(74, 58, 142, 0.3) !important;
}

.dashboard-btn {
  background: linear-gradient(135deg, #1a3a2e, #2a5a4e) !important;
  border: 1px solid rgba(58, 142, 106, 0.4) !important;
}

.dashboard-btn .index-btn-icon {
  background: rgba(58, 142, 106, 0.3) !important;
}

.dashboard-btn:hover {
  border-color: rgba(58, 142, 106, 0.8) !important;
  box-shadow: 0 8px 30px rgba(58, 142, 106, 0.3) !important;
}

.index-footer {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-family: Arial, sans-serif;
  letter-spacing: 0.5px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(145deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
  padding: 20px;
}

.login-card {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 50px 45px;
  max-width: 420px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  text-align: center;
  transition: transform 0.3s ease;
}

.login-card:hover {
  transform: translateY(-4px);
}

.login-icon {
  font-size: 4rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

.login-card h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 10px 0 0 0;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffcc00 0%, #ff8800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.login-card h1 span {
  font-weight: 300;
  background: linear-gradient(135deg, #ff8800 0%, #ff4400 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.login-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #ffcc00, #ff8800);
  border-radius: 10px;
  margin: 25px auto 30px;
}

.login-start-btn {
  width: 100%;
  padding: 18px 20px;
  background: linear-gradient(135deg, #ffcc00 0%, #ff8800 100%);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(255, 204, 0, 0.2);
  min-height: 56px;
  letter-spacing: 0.5px;
}

.login-start-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 35px rgba(255, 204, 0, 0.35);
}

.login-start-btn:active {
  transform: scale(0.97);
}

.login-start-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-note {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  margin-top: 20px;
  line-height: 1.6;
}

.login-status {
  margin-top: 16px;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-status.error {
  background: rgba(255, 68, 68, 0.15);
  color: #ff4444;
  border: 1px solid rgba(255, 68, 68, 0.3);
}

.login-status.success {
  background: rgba(0, 200, 83, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 200, 83, 0.3);
}

/* ============================================
   SONGS LIST
   ============================================ */
.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  padding: 10px 0;
  border-bottom: 1px solid #2a2a4e;
  margin-bottom: 10px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
}

.header-top h2 {
  font-size: 1.3rem;
  color: #ffcc00;
  font-family: Arial, sans-serif;
  margin: 0;
}

.home-btn {
  background: #2a2a4e;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  min-height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.home-btn:hover {
  background: #3a3a6e;
}

.search-container {
  position: relative;
  padding: 0 0 10px 0;
}

#searchInput {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a2e;
  border: 1px solid #2a2a4e;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  outline: none;
  min-height: 48px;
}

#searchInput:focus {
  border-color: #ffcc00;
}

#searchInput::placeholder {
  color: #666;
}

#clearSearchBtn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 10px;
  min-height: 44px;
  min-width: 44px;
  display: none;
}

#clearSearchBtn:hover {
  color: #fff;
}

.song-list {
  flex: 1;
  overflow-y: auto;
  background: #151515;
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
  min-height: 300px;
}

.song-list .loading-text,
.song-list .empty-text,
.song-list .error-text {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-family: Arial, sans-serif;
}

.song-list .error-text {
  color: #ff4444;
}

.song-item {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 4px;
  text-align: left;
  background: #1a1a2e;
  border: 1px solid #2a2a4e;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: background 0.2s, transform 0.1s;
  min-height: 44px;
}

.song-item:hover {
  background: #2a2a4e;
}

.song-item:active {
  transform: scale(0.98);
}

/* Floating Bar */
.floating-bar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 14px;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  border: 1px solid #2a2a2a;
}

.floating-bar button {
  padding: 12px 30px;
  min-width: 120px;
  background: #2a2a4e;
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  font-family: Arial, sans-serif;
  min-height: 48px;
  transition: background 0.2s;
}

.floating-bar button:hover {
  background: #3a3a6e;
}

.floating-bar button:active {
  transform: scale(0.96);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-wrapper {
  display: block !important;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto !important;
  background: linear-gradient(145deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
  padding: 20px;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.dashboard-card {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 40px 35px;
  max-width: 800px;
  width: 100%;
  min-height: auto !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  margin: 0 auto;
}

.dashboard-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h2 {
  font-size: 2rem;
  margin: 0;
  color: #ffcc00;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.dashboard-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  margin-top: 4px;
  font-family: Arial, sans-serif;
}

.dashboard-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #ffcc00, #ff8800);
  border-radius: 10px;
  margin: 20px 0 25px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background: #1a1a2e;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #2a2a4e;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffcc00;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #888;
  margin-top: 4px;
  font-family: Arial, sans-serif;
}

.dashboard-section {
  margin-top: 25px;
}

.dashboard-section h3 {
  color: #aaa;
  font-size: 1.1rem;
  font-family: Arial, sans-serif;
  margin-bottom: 10px;
}

.user-list {
  max-height: 300px;
  overflow-y: auto;
  background: #151515;
  border-radius: 10px;
  padding: 5px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 14px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 4px;
  border: 1px solid #2a2a4e;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #2a2a4e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: bold;
  color: #fff;
  font-family: Arial, sans-serif;
}

.user-email {
  font-size: 0.8rem;
  color: #888;
  font-family: Arial, sans-serif;
}

.user-login {
  font-size: 0.7rem;
  color: #666;
  font-family: Arial, sans-serif;
}

.user-count {
  font-size: 0.8rem;
  color: #4fc3f7;
  font-family: Arial, sans-serif;
  white-space: nowrap;
}

.song-list-dashboard {
  max-height: 250px;
  overflow-y: auto;
  background: #151515;
  border-radius: 10px;
  padding: 5px;
}

.song-item-dashboard {
  padding: 10px 14px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 4px;
  border: 1px solid #2a2a4e;
  color: #fff;
  font-family: Arial, sans-serif;
}

.empty-text,
.error-text {
  text-align: center;
  padding: 20px;
  color: #888;
  font-family: Arial, sans-serif;
}

.error-text {
  color: #ff4444;
}

.dashboard-footer {
  margin-top: 25px;
  text-align: center;
}

.back-btn {
  background: #2a2a4e;
  color: white;
  padding: 12px 30px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: background 0.3s;
}

.back-btn:hover {
  background: #3a3a6e;
}

.back-btn:active {
  transform: scale(0.96);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .index-card {
    padding: 30px 20px;
    border-radius: 24px;
  }
  
  .index-header h1 {
    font-size: 2rem;
  }
  
  .index-icon-image {
    width: 60px;
    height: 60px;
  }
  
  .index-btn {
    padding: 12px 16px;
    gap: 12px;
  }
  
  .index-btn-icon {
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
  }
  
  .index-btn-label {
    font-size: 0.95rem;
  }
  
  .index-btn-desc {
    font-size: 0.65rem;
  }
  
  .logout-btn-index {
    font-size: 0.8rem;
    padding: 6px 16px;
  }
  
  .index-divider-light {
    margin: 6px 0 12px 0;
  }
  
  .index-buttons {
    gap: 10px;
  }

  .login-card {
    padding: 35px 25px;
    border-radius: 24px;
  }
  
  .login-card h1 {
    font-size: 2rem;
  }
  
  .login-icon {
    font-size: 3rem;
  }
  
  .login-start-btn {
    padding: 16px;
    font-size: 1rem;
    min-height: 50px;
  }

  .dashboard-card {
    padding: 25px 20px;
    border-radius: 24px;
  }
  
  .dashboard-header h2 {
    font-size: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .user-item {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .user-list {
    max-height: 200px;
  }
  
  .song-list-dashboard {
    max-height: 180px;
  }

  .app {
    padding: 10px;
  }
  
  .floating-bar {
    gap: 6px;
    padding: 8px 12px;
    width: 98%;
    justify-content: center;
    bottom: 6px;
  }
  
  .floating-bar button {
    padding: 10px 16px;
    min-width: 80px;
    font-size: 0.9rem;
    min-height: 40px;
  }
}

@media (min-width: 769px) {
  .app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
  }
}