/* Reset styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  background-color: #000;
  color: #fff;
  overflow: hidden;
  min-height: 100vh;
}

/* Header styles */
.header {
  background-color: #333;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn {
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
}

.header-btn:hover {
  transform: scale(1.05);
}

/* Sidebar styles */
.sidebar {
  position: fixed !important;
  left: 0;
  top: 50px;
  bottom: 0;
  width: 70px;
  background-color: #1a1a1a;
  z-index: 90 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar-item {
  width: 100%;
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  color: #999;
  text-decoration: none;
}

.sidebar-item img {
  width: 28px;
  height: 28px;
  opacity: 0.7;
}

.sidebar-item span {
  font-size: 12px;
  color: #999;
  text-align: center;
}

.sidebar-item:hover {
  transform: translateX(5px);
}

.sidebar-item.active {
  background-color: #333;
  color: #fff;
}

.sidebar-item.active img {
  opacity: 1;
}

/* Dark theme */
.dark-theme {
  background-color: #000;
  color: #eee;
}

/* Font classes */
.font-digit {
  font-family: clockicons, sans-serif;
}

.font-digit-text {
  font-family: vpssolah, sans-serif;
  letter-spacing: -0.1em;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Modal styles */
/* Modal styles - optimized */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  /* Only use backdrop-filter when modal is active to reduce GPU load */
  /* Create a separate class for active modals */
}

/* Add this class when modal is shown */
.modal.active {
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: #2a2a2a;
  width: 90%;
  max-width: 400px;
  margin: 50px auto;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout paint style; /* Improve performance by containing repaints */
  animation: modalFadeIn 0.25s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #3a3a3a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  contain: content; /* Content containment for better performance */
}

.modal-title {
  color: #ff9800;
  font-size: 18px;
  margin: 0;
}

.modal-body {
  padding: 20px;
  contain: content; /* Content containment for better performance */
}

/* Optimized animation with fewer steps and better performance */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

/* Optional: Reduced complexity gradient animation for modal backgrounds */
@keyframes gradientShift {
  0%,
  100% {
    background: radial-gradient(
      circle at 30% 50%,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.8)
    );
  }
  50% {
    background: radial-gradient(
      circle at 70% 50%,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.8)
    );
  }
}
.close {
  background: none;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #ff9800;
  margin-bottom: 8px;
  font-size: 14px;
}

.input-group {
  display: flex;
  gap: 10px;
}

.form-control {
  background: #333;
  border: 1px solid #444;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 16px;
  width: 100%;
}

/* Fullscreen button */
.fullscreen-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.fullscreen-btn:hover {
  opacity: 1;
}

.fullscreen-btn img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

/* Sound selector styles */
.sound-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px auto;
  max-width: 300px;
}

.sound-selector select {
  flex: 1;
  padding: 8px 12px;
  background: #333;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-family: "Roboto", sans-serif;
}

#alarm-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  padding: 35px 45px;
  background: rgba(51, 51, 51, 0.95);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  min-width: 400px;
  max-width: 90%;
  z-index: 1100;
  animation: notification-fade-in 0.5s ease;
}

#alarm-notification.active {
  display: block;
}

/* Animation cho alarm notification */
@keyframes notification-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Style cho nội dung trong notification */
#alarm-notification h3 {
  color: #ff9800;
  margin-bottom: 15px;
  font-size: 2em;
  font-weight: bold;
}

#alarm-notification p {
  color: #fff;
  margin: 15px 0;
  font-size: 1.3em;
  line-height: 1.4;
}

#alarm-notification button {
  background: #ff9800;
  color: #000;
  border: none;
  padding: 12px 30px;
  border-radius: 12px;
  margin-top: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2em;
  transition: all 0.3s ease;
}

#alarm-notification button:hover {
  background: #ffa726;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

/* Thêm style cho nút background */
.control-button {
  background: transparent;
  border: none;
  color: var(--text-color);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.control-button i {
  font-size: 1.4rem;
}

/* Audio player controls */
.music-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
}

.bg-music-select {
  padding: 5px 10px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  min-width: 120px;
}

#toggleMusic {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

#toggleMusic:hover {
  background: rgba(255, 255, 255, 0.1);
}

#backgroundMusic {
  display: none;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  -webkit-appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-icon {
  color: white;
  font-size: 16px;
  cursor: pointer;
}

/* PiP button styles */
#pipButton {
  position: relative;
  transition: all 0.3s ease;
}

#pipButton i {
  font-size: 1.1rem;
}

#pipButton:hover {
  transform: scale(1.1);
}

/* Animation khi chuyển đổi icon */
#pipButton i {
  transition: transform 0.3s ease;
}

#pipButton:active i {
  transform: scale(0.9);
}

/* Thêm tooltip khi hover */
#pipButton::after {
  content: "Picture in Picture";
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#pipButton:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -25px;
}

/* Style khi PiP đang active */
#pipButton.active {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #pipButton::after {
    display: none; /* Ẩn tooltip trên mobile */
  }
}

/* Thêm vào cuối file, sau phần .music-control */
.music-input-container {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 2px;
  margin-right: 5px;
  overflow: hidden;
}

.music-url-input {
  background: transparent;
  border: none;
  color: white;
  padding: 8px 12px;
  font-size: 14px;
  width: 250px;
  outline: none;
}

.music-url-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#loadMusicBtn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #4caf50;
  cursor: pointer;
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  transition: all 0.3s ease;
  margin-right: 3px;
}

#loadMusicBtn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Thêm style cho player ẩn */
#external-music-player {
  opacity: 0;
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 0;
  height: 0;
  border: none;
}

/* Player UI */
.music-player-ui {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 350px;
  background: #282828;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
  overflow: hidden;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-player-ui.show {
  transform: translateY(0);
}

.music-player-ui.minimized .player-content {
  height: 0;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-title {
  font-size: 14px;
  font-weight: 600;
  color: #1db954;
}

.player-controls {
  display: flex;
  gap: 8px;
}

.player-button {
  background: transparent;
  border: none;
  color: #ddd;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.player-content {
  height: 800px;
  transition: height 0.3s ease;
  overflow: hidden;
}

.player-frame {
  width: 100%;
  height: 380px;
  background: #121212;
}

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.player-info {
  padding: 10px 15px;
}

.player-track-title {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.player-track-source {
  font-size: 11px;
  color: #aaa;
}

/* Thêm vào phần CSS player UI */
.player-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-control-button {
  background: transparent;
  border: none;
  color: #ddd;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.player-control-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.player-toggle-button {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 16px;
}

.player-toggle-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.player-volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 15px;
  min-width: 100px;
}

.player-volume-icon {
  color: #ddd;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.player-volume-icon:hover {
  color: white;
}

.player-volume-slider {
  -webkit-appearance: none;
  width: 70px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.player-volume-slider:hover {
  height: 6px;
}

.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #1db954;
}

/* Nút playlist */
.player-control-button.active {
  color: #4caf50;
}

.player-control-button.active i {
  animation: spin 4s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Điều chỉnh responsive */
@media (max-width: 768px) {
  .music-player-ui {
    width: 320px;
    right: 10px;
    bottom: 10px;
  }

  .player-content {
    height: 340px;
  }

  .player-frame {
    height: 340px;
  }

  .player-volume-slider {
    width: 50px;
  }
}

/* Ẩn các nút chuyển bài khi không phải playlist */
.player-control-button.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Cập nhật player progress bar */
.player-progress-container {
  padding: 5px 0;
}

.player-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  margin-bottom: 4px;
  transition: height 0.2s ease;
}

.player-progress-bar:hover {
  height: 6px;
}

.player-progress-value {
  height: 100%;
  background: #1db954;
  border-radius: 2px;
  width: 0;
  position: relative;
  transition: width 0.1s linear;
  animation: progressPulse 2s infinite;
}

.player-progress-value.progress-updating {
  animation: progressUpdate 0.1s ease-out;
}

/* Animation cho progress bar khi đang phát */
@keyframes progressPulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

/* Animation cho progress bar khi cập nhật */
@keyframes progressUpdate {
  0% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.2);
  }
  100% {
    transform: scaleY(1);
  }
}

/* Hiệu ứng hover cho progress bar */
.player-progress-bar:hover .player-progress-value {
  height: 6px;
  transform: scaleY(1.2);
  transition: all 0.2s ease;
}

.player-progress-value::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
  animation: glowDot 2s infinite;
}

/* Animation cho dot indicator */
@keyframes glowDot {
  0% {
    box-shadow: 0 0 5px rgba(29, 185, 84, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(29, 185, 84, 0.5);
  }
}

/* Smooth transition cho thời gian */
.player-time span {
  transition: all 0.3s ease;
}

.youtube-theme .player-progress-value {
  background: #ff0000; /* Màu YouTube */
}

.soundcloud-theme .player-progress-value {
  background: #ff5500; /* Màu SoundCloud */
}

.player-time {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #aaa;
}

/* Thêm class theme cho các nền tảng */
.music-player-ui.youtube-theme .player-title {
  color: #ff0000;
}

.music-player-ui.spotify-theme .player-title {
  color: #1db954;
}

.music-player-ui.soundcloud-theme .player-title {
  color: #ff5500;
}

/* Điều chỉnh kích thước cho các nền tảng khác nhau */
.youtube-view .player-frame {
  height: 230px;
}

.spotify-view .player-frame {
  height: 250px;
}

.soundcloud-view .player-frame {
  height: 160px;
}

/* Thêm styles cho Spotify player */
.spotify-player {
  padding: 20px;
  background: #282828;
  color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.track-info {
  text-align: center;
  margin-bottom: 20px;
}

.track-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.track-info p {
  color: #b3b3b3;
  font-size: 14px;
}

.track-controls {
  width: 100%;
}

/* Cập nhật styles cho progress bar */
.player-progress-bar {
  cursor: pointer;
}

.player-progress-bar:hover .player-progress-value {
  background-color: #1ed760;
}

/* Styles cho danh sách URL */
.url-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.url-list-item {
  padding: 8px 12px;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url-list-item:hover {
  background: #333;
}

/* Đảm bảo container có position relative */
.music-input-container {
  position: relative;
}

/* Điều chỉnh theme cho Spotify */
.music-player-ui.spotify-theme {
  background: linear-gradient(to bottom, #282828, #121212);
}

.spotify-theme .player-header {
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spotify-theme .player-title {
  color: #1db954; /* Màu xanh đặc trưng của Spotify */
}

/* Cập nhật style cho playlist container khi hiển thị Spotify */
.spotify-theme .playlist-container {
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spotify-theme .playlist-track.active {
  background: rgba(29, 185, 84, 0.3); /* Màu xanh Spotify khi active */
}

/* Thêm style cho thông báo login Spotify */
.spotify-login-notice {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  padding: 20px;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.login-notice-content {
  text-align: center;
  color: white;
  animation: fadeIn 0.3s ease;
}

.login-notice-content i {
  font-size: 28px;
  color: #1db954;
  margin-bottom: 12px;
  display: block;
}

.login-notice-content p {
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.login-notice-content a {
  color: #1db954;
  text-decoration: none;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.login-notice-content a:hover {
  background: rgba(29, 185, 84, 0.1);
  text-decoration: underline;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Style cho progress bar của Spotify */
.spotify-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 15px;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.spotify-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  margin-bottom: 4px;
  transition: height 0.2s ease;
}

.spotify-progress-bar:hover {
  height: 6px;
}

.spotify-progress-value {
  height: 100%;
  background: #1db954;
  border-radius: 2px;
  width: 0;
  position: relative;
  transition: width 0.1s linear;
}

.spotify-progress-value::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.spotify-progress-bar:hover .spotify-progress-value::after {
  opacity: 1;
}

.spotify-time {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
}

/* Điều chỉnh vị trí iframe để không che progress bar */
.player-frame iframe {
  height: calc(100% - 50px) !important;
  margin-bottom: 50px;
}

/* Cập nhật style cho Spotify player */
.spotify-player-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #282828;
  border-radius: 12px;
  overflow: hidden;
}

.spotify-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 15px;
  z-index: 5;
  backdrop-filter: blur(10px);
  border-radius: 0 0 12px 12px;
}

.spotify-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  margin-bottom: 4px;
  transition: height 0.2s ease;
}

.spotify-progress-bar:hover {
  height: 6px;
}

.spotify-progress-value {
  height: 100%;
  background: #1db954;
  border-radius: 2px;
  width: 0;
  position: relative;
  transition: width 0.1s linear;
}

.spotify-time {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
}

/* Điều chỉnh vị trí của login notice */
.spotify-login-notice {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

/* Cập nhật style cho focus states */
.spotify-progress-bar:focus {
  outline: 2px solid #1db954;
  outline-offset: 2px;
}

.spotify-progress-bar:focus:not(:focus-visible) {
  outline: none;
}

/* Thêm focus styles cho các interactive elements */
.login-notice-content a:focus {
  outline: 2px solid #1db954;
  outline-offset: 2px;
  background: rgba(29, 185, 84, 0.1);
}

/* Thêm reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .spotify-progress-value,
  .login-notice-content,
  .spotify-progress-bar,
  .spotify-login-notice {
    transition: none;
  }

  .login-notice-content {
    animation: none;
  }
}

/* High contrast mode support */
@media (forced-colors: active) {
  .spotify-progress-value {
    background: SelectedItem;
  }

  .spotify-progress-bar {
    border: 1px solid ButtonText;
  }

  .login-notice-content a {
    color: LinkText;
  }
}

/* Xóa các style không cần thiết */
.spotify-progress-container,
.spotify-progress-bar,
.spotify-progress-value,
.spotify-time {
  display: none;
}

/* Cập nhật style cho player container */
.spotify-player-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #282828;
  border-radius: 12px;
  overflow: hidden;
}

/* Cập nhật style cho iframe */
#spotify-player {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: none;
}
/* Smooth fade-in for clock display */
@keyframes fadeInClock {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Smooth scale transition for buttons */
@keyframes scaleButton {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Enhanced glow effect for the clock */
@keyframes enhancedGlow {
  0% {
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.3),
      0 0 20px rgba(255, 152, 0, 0.2);
  }
  33% {
    text-shadow: 0 0 15px rgba(255, 152, 0, 0.5),
      0 0 30px rgba(255, 152, 0, 0.3), 0 0 45px rgba(255, 152, 0, 0.2);
  }
  66% {
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.6),
      0 0 40px rgba(255, 152, 0, 0.4), 0 0 60px rgba(255, 152, 0, 0.2);
  }
  100% {
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.3),
      0 0 20px rgba(255, 152, 0, 0.2);
  }
}

/* Breathing effect for alarm elements */
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.9;
  }
}

/* Smooth border glow for active elements */
@keyframes borderGlow {
  0%,
  100% {
    border-color: rgba(255, 152, 0, 0.2);
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.2);
  }
  50% {
    border-color: rgba(255, 152, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
  }
}

/* Enhanced shake animation for alarm */
@keyframes enhancedShake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-6px) rotate(-1deg);
  }
  30% {
    transform: translateX(5px) rotate(1deg);
  }
  45% {
    transform: translateX(-4px) rotate(-0.5deg);
  }
  60% {
    transform: translateX(3px) rotate(0.5deg);
  }
  75% {
    transform: translateX(-2px) rotate(-0.25deg);
  }
  90% {
    transform: translateX(1px) rotate(0.25deg);
  }
}

/* Floating effect for buttons and elements */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Ripple effect for buttons */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Smooth entry for modal elements */
@keyframes smoothEntry {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  30% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Number rotation animation for countdown effect */
@keyframes numberRotation {
  0% {
    transform: rotateX(0deg);
    opacity: 1;
  }
  20% {
    transform: rotateX(90deg);
    opacity: 0;
  }
  80% {
    transform: rotateX(270deg);
    opacity: 0;
  }
  100% {
    transform: rotateX(360deg);
    opacity: 1;
  }
}

/* Background gradient shift for modal backdrops */
@keyframes gradientShift {
  0% {
    background: radial-gradient(
      circle at 30% 50%,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.8) 100%
    );
  }
  50% {
    background: radial-gradient(
      circle at 70% 50%,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.8) 100%
    );
  }
  100% {
    background: radial-gradient(
      circle at 30% 50%,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.8) 100%
    );
  }
}

/* Typing cursor effect for digital displays */
@keyframes cursorBlink {
  0%,
  100% {
    border-right: 2px solid rgba(255, 152, 0, 0);
  }
  50% {
    border-right: 2px solid rgb(3, 2, 1);
  }
}

/* Wave effect for sound visualization */
@keyframes soundWave {
  0%,
  100% {
    height: 5px;
  }
  25% {
    height: 15px;
  }
  50% {
    height: 20px;
  }
  75% {
    height: 15px;
  }
}
.performance-dropdown {
  display: inline-block;
  position: relative;
  margin-left: 10px;
  font-family: "Arial", sans-serif;
}

.performance-dropdown button.performance-btn {
  padding: 8px 15px;
  background: rgba(74, 85, 104, 0.7);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-dropdown button.performance-btn:hover {
  background: rgba(45, 55, 72, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.performance-dropdown button.performance-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  background: rgba(26, 32, 44, 0.85);
}

/* Add a small icon to indicate dropdown with improved styling */
.performance-dropdown button.performance-btn::after {
  content: "▼";
  font-size: 10px;
  margin-left: 8px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.8;
}

.performance-dropdown button.performance-btn.active {
  background: rgba(45, 55, 72, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.performance-dropdown button.performance-btn.active::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown Content with Blur Effect */
.performance-dropdown .dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 5px;
  min-width: 220px;
  border-radius: 8px;
  z-index: 1000;
  overflow: hidden;
  transform-origin: top center;

  /* Glass morphism effect */
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.performance-dropdown .dropdown-content.visible {
  display: block;
  animation: dropdownAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Button styling inside dropdown */
.performance-dropdown .dropdown-content button {
  width: 100%;
  padding: 12px 15px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  position: relative;
  color: #4a5568;
  transition: all 0.25s ease;
  cursor: pointer;
}

/* Icons for performance options */
.performance-dropdown .dropdown-content button.high-quality::before {
  content: "🚀";
  margin-right: 10px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.performance-dropdown .dropdown-content button.medium-quality::before {
  content: "⚡";
  margin-right: 10px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.performance-dropdown .dropdown-content button.low-quality::before {
  content: "🔋";
  margin-right: 10px;
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Hover effect with smooth transition */
.performance-dropdown .dropdown-content button:hover {
  background-color: rgba(226, 232, 240, 0.7);
  color: #2b6cb0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
  padding-left: 20px;
}

.performance-dropdown .dropdown-content button:hover::before {
  transform: scale(1.2) rotate(10deg);
}

/* Click effect */
.performance-dropdown .dropdown-content button:active {
  background-color: rgba(190, 227, 248, 0.8);
  animation: buttonPulse 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Styling for selected option */
.performance-dropdown .dropdown-content button.selected {
  background-color: rgba(237, 242, 247, 0.7);
  font-weight: bold;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.08);
}

/* Check mark for selected option */
.performance-dropdown .dropdown-content button.selected::after {
  content: "✓";
  position: absolute;
  right: 15px;
  color: #2c5282;
  font-size: 16px;
  animation: checkmarkAppear 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Separator between options */
.performance-dropdown .dropdown-content button:not(:last-child) {
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

/* KEYFRAMES */
@keyframes dropdownAppear {
  0% {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
    backdrop-filter: blur(0px);
  }
  70% {
    opacity: 1;
    transform: translateY(2px) scale(1.02);
    backdrop-filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    backdrop-filter: blur(10px);
  }
}

@keyframes buttonPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes checkmarkAppear {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  70% {
    opacity: 1;
    transform: scale(1.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Add this animation for each option in the dropdown */
.performance-dropdown .dropdown-content.visible button {
  opacity: 0;
  animation: optionAppear 0.3s forwards;
}

.performance-dropdown .dropdown-content.visible button:nth-child(1) {
  animation-delay: 0.05s;
}

.performance-dropdown .dropdown-content.visible button:nth-child(2) {
  animation-delay: 0.1s;
}

.performance-dropdown .dropdown-content.visible button:nth-child(3) {
  animation-delay: 0.15s;
}

@keyframes optionAppear {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hiệu ứng cho nút trong header */
.header-btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-btn:hover {
  transform: scale(1.05);
}

/* Hiệu ứng modal mở */
.modal.show .modal-content {
  animation: modalPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Thêm vào cuối file style.css để ghi đè các style xung đột trước đó */

/* Ghi đè các style Spotify để đảm bảo hiển thị đúng */
#music-player-ui.spotify-theme #player-iframe-container {
  position: relative !important;
  height: 352px !important;
  max-height: 70vh !important;
  padding-top: 0 !important;
  background: #000 !important;
  overflow: hidden !important;
}

/* Đảm bảo iframe Spotify hiển thị đúng */
#spotify-player {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: 12px 12px 0 0 !important;
  display: block !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Ghi đè các ẩn không cần thiết */
.spotify-progress-container,
.spotify-progress-bar,
.spotify-progress-value,
.spotify-time {
  display: none !important;
}

/* Đảm bảo container đúng kích thước */
.spotify-player-container {
  width: 100% !important;
  height: auto !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  position: relative !important;
}

/* Loại bỏ các style không cần thiết từ style.css */
#music-player-ui.spotify-theme .spotify-progress-container,
#music-player-ui.spotify-theme .spotify-progress-bar,
#music-player-ui.spotify-theme .spotify-progress-value,
#music-player-ui.spotify-theme .spotify-time {
  display: none !important;
}

/* Điều chỉnh style cho các controls */
#music-player-ui.spotify-theme .player-controls {
  background-color: #121212 !important;
  padding: 15px !important;
}

/* Đảm bảo CSS cho Spotify không bị ghi đè */
#music-player-ui.spotify-theme #player-iframe-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Media queries để đảm bảo responsive */
@media (max-width: 768px) {
  #music-player-ui.spotify-theme #player-iframe-container {
    height: 300px !important;
  }
}

@media (max-width: 480px) {
  #music-player-ui.spotify-theme #player-iframe-container {
    height: 240px !important;
  }
}
