@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* Theme Variables */
:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --widget-bg: rgba(30, 30, 30, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #666;
  --accent-color: #007aff;
  --accent-hover: #0056d6;
  --love-color: #ff3b5c;
  --success-color: #30d158;
  --error-color: #ff3b5c;
  --border-color: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.1);
  --about-me: white;
  --angle: 135deg; /* Default angle for rotation */
}
body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(
    var(--angle),
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  transition: all 0.3s ease;
}

[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --widget-bg: rgba(255, 255, 255, 0.95);
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: rgba(0, 0, 0, 0.1);
  --input-bg: rgba(0, 0, 0, 0.05);
}

[data-theme="pastel-violet"] {
  --bg-primary: #f3e8ff;
  --bg-secondary: #e1cfff;
  --widget-bg: rgba(243, 232, 255, 0.95);
  --text-primary: #3b225f;
  --text-secondary: #6c4fa8;
  --text-muted: #9c7ed9;
  --accent-color: #b388ff;
  --accent-hover: #7c4dff;
  --love-color: #ce93d8;
  --success-color: #81c784;
  --error-color: #e57373;
  --border-color: rgba(59, 34, 95, 0.15);
  --input-bg: rgba(255, 255, 255, 0.6);
}

[data-theme="pastel-blue"] {
  --bg-primary: #e3f2fd;
  --bg-secondary: #bbdefb;
  --widget-bg: rgba(227, 242, 253, 0.95);
  --text-primary: #0d2c5a;
  --text-secondary: #4174a3;
  --text-muted: #7ba6d2;
  --accent-color: #64b5f6;
  --accent-hover: #2196f3;
  --love-color: #90caf9;
  --success-color: #81c784;
  --error-color: #e57373;
  --border-color: rgba(13, 44, 90, 0.15);
  --input-bg: rgba(255, 255, 255, 0.6);
}

[data-theme="pastel-yellow"] {
  --bg-primary: #fff9e1;
  --bg-secondary: #fff3c1;
  --widget-bg: rgba(255, 249, 225, 0.95);
  --text-primary: #665500;
  --text-secondary: #9a8310;
  --text-muted: #bba94e;
  --accent-color: #ffeb3b;
  --accent-hover: #fdd835;
  --love-color: #fbc02d;
  --success-color: #aed581;
  --error-color: #f44336;
  --border-color: rgba(102, 85, 0, 0.15);
  --input-bg: rgba(255, 255, 255, 0.6);
}

[data-theme="pastel-red"] {
  --bg-primary: #ffe5e5;
  --bg-secondary: #ffcdd2;
  --widget-bg: rgba(255, 229, 229, 0.95);
  --text-primary: #5a1a1a;
  --text-secondary: #a14a4a;
  --text-muted: #c97c7c;
  --accent-color: #ef5350;
  --accent-hover: #e53935;
  --love-color: #f06292;
  --success-color: #81c784;
  --error-color: #d32f2f;
  --border-color: rgba(90, 26, 26, 0.15);
  --input-bg: rgba(255, 255, 255, 0.6);
}

[data-theme="pastel-orange"] {
  --bg-primary: #fff3e0;
  --bg-secondary: #ffe0b2;
  --widget-bg: rgba(255, 243, 224, 0.95);
  --text-primary: #5a3410;
  --text-secondary: #a1662f;
  --text-muted: #c28b5a;
  --accent-color: #ffa726;
  --accent-hover: #fb8c00;
  --love-color: #ff7043;
  --success-color: #aed581;
  --error-color: #ef5350;
  --border-color: rgba(90, 52, 16, 0.15);
  --input-bg: rgba(255, 255, 255, 0.6);
}

[data-theme="pastel-green"] {
  --bg-primary: #e8f5e9;
  --bg-secondary: #c8e6c9;
  --widget-bg: rgba(232, 245, 233, 0.95);
  --text-primary: #204120;
  --text-secondary: #4a864a;
  --text-muted: #77b777;
  --accent-color: #81c784;
  --accent-hover: #66bb6a;
  --love-color: #a5d6a7;
  --success-color: #4caf50;
  --error-color: #ef5350;
  --border-color: rgba(32, 65, 32, 0.15);
  --input-bg: rgba(255, 255, 255, 0.6);
}

[data-theme="pastel-pink"] {
  --bg-primary: #fce4ec;
  --bg-secondary: #f8bbd0;
  --widget-bg: rgba(252, 228, 236, 0.95);
  --text-primary: #3e1f2b;
  --text-secondary: #7a3e57;
  --text-muted: #a26b82;
  --accent-color: #ec407a;
  --accent-hover: #d81b60;
  --love-color: #e91e63;
  --success-color: #66bb6a;
  --error-color: #ef5350;
  --border-color: rgba(62, 31, 43, 0.15);
  --input-bg: rgba(255, 255, 255, 0.6);
}

.main-h1 {
  font-size: 1.5em;
  color: var(--text-primary);
  text-align: center;
  padding-bottom: 0.5em;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.widget {
  background: var(--widget-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px;
  width: 320px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  margin: 10px;
}

.widget.compact {
  width: 280px;
  padding: 16px;
}

.widget.compact .album-cover {
  width: 60px;
  height: 60px;
  float: left;
  margin-right: 12px;
  margin-bottom: 8px;
}

.widget.compact .song-info {
  margin-bottom: 8px;
}

.widget.compact .song-title {
  font-size: 14px;
}

.widget.compact .artist-name {
  font-size: 12px;
}

.widget.compact .album-info {
  font-size: 10px;
}

.widget.compact .track-stats {
  font-size: 10px;
}

.setup-form {
  text-align: center;
}

.setup-form h2 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.setup-form h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 300;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.formGroup input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.setup-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent-color);
  color: black;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
}

.setup-btn:hover {
  transform: translateY(-1px);
}

.setup-btn:disabled {
  background: #666;
  cursor: not-allowed;
  transform: none;
}

.now-playing {
  display: none;
}

.header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.widget-title {
  font-size: 1.2em;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
}

.header-buttons {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  color: var(--text-muted);
  transform: scale(1.2);
}

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

.album-cover {
  width: 100%;
  max-height: auto;
  border-radius: 12px;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
  image-rendering: auto;
}

.album-cover:hover {
  transform: scale(1.01);
}

.song-info {
  margin-bottom: 16px;
}

.song-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-name {
  font-size: 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.control-group {
  display: flex;
  gap: 8px;
}

.love-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.love-btn:hover {
  background: rgba(255, 59, 92, 0.2);
  transform: scale(1.1);
}

.love-btn.loved {
  color: var(--love-color);
}

.love-btn.loved:hover {
  background: rgba(255, 59, 92, 0.3);
}

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

.love-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.heart-icon {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.heart-icon.loved {
  fill: var(--love-color);
  animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.refresh-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.refresh-btn:hover {
  background: var(--input-bg);
  transform: scale(1.1);
}

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

.refresh-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.refresh-icon.spinning {
  animation: spin 1s linear infinite;
}

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

.status {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.status.error {
  color: var(--error-color);
}

.status.success {
  color: var(--text-muted);
  font-weight: 900;
  animation: fade 1.8s ease-in-out infinite;
}

@keyframes fade {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6; /* Fades to 60% opacity */
  }
}



.error-message {
  color: var(--error-color);
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--widget-bg);
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 24px;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loved-track {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.loved-track:last-child {
  border-bottom: none;
}

.loved-track-info {
  flex: 1;
}

.loved-track-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.loved-track-artist {
  color: var(--text-secondary);
  font-size: 12px;
}

.loved-track-date {
  color: var(--text-muted);
  font-size: 10px;
  margin-top: 4px;
}

.share-modal-content {
  text-align: center;
}

.share-link {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  color: var(--text-primary);
  font-size: 14px;
  margin: 16px 0;
  user-select: all;
}

.share-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.share-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.share-btn.copy {
  background: var(--accent-color);
  color: white;
}

.share-btn.copy:hover {
  background: var(--accent-hover);
}

.share-btn.twitter {
  background: #1da1f2;
  color: white;
}

.share-btn.twitter:hover {
  background: #1a91da;
}

.keyboard-shortcuts {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--widget-bg);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  display: none;
}

.keyboard-shortcuts.show {
  display: block;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 16px;
}

.shortcut-key {
  background: var(--input-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 10px;
}

/* Responsive design */
@media (max-width: 360px) {
  .widget {
    width: 100%;
    max-width: 300px;
  }
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%); /* Center horizontally and start above viewport */
  background: var(--widget-bg);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(-50%) translateY(0); /* Center horizontally and slide to original position */
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.notification-info {
  flex: 1;
}

.notification-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.notification-artist {
  color: var(--text-secondary);
  font-size: 12px;
}

.loggedinas {
  color: var(--text-muted);
  font-size: small;
  margin-bottom: 8px;
  text-align: justify;
}

.loggedinas:hover {
  cursor: pointer;
}
#usernameDisplay {
  text-decoration: underline;
}
.aboutme {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--text-primary);
  font-size: 13px;
  z-index: 10;
  pointer-events: none;
}

.aboutme a {
  color: var(--text-primary);
  text-decoration: none;
  pointer-events: auto;
}
/* Spinning animation */
.spinning {
  animation: spin 0.5s linear;
}

/* Keyframes for the spin effect */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Ensure the SVG rotates around its center */
svg {
  transform-origin: center;
}
.other-info {
  display: none;
  font-family: "Inter", sans-serif;
  height: 567px;
  background: var(--widget-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px;
  width: 320px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  margin: 10px;
}

.maincontent {
  overflow: auto;
  max-height: 80%;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}

/* For Webkit browsers */
.maincontent::-webkit-scrollbar {
  width: 8px;
  background: transparent;
  border-radius: 8px;
}

.maincontent::-webkit-scrollbar-thumb {
  border-radius: 8px;
}

.other-info h3 {
  color: var(--text-primary);
  font-size: 16px;
}

.oi-button-container {
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.oi-button-container button {
  background: none;
  border: none;
  color: var(--text-secondary);
  border-radius: 0.2rem;
  text-decoration: underline;
  font-family: "Inter", sans-serif;
}

.oi-button-container button:hover {
  text-decoration: underline;
  cursor: pointer;
}
.oi-button-container button svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 4px;
  stroke: var(--text-primary);
  transition: stroke 0.2s;
  flex-shrink: 0;
}
.refresh-icon {
  stroke: var(--text-secondary);
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.other-info.show {
  display: block;
  animation: slideInFromLeft 0.6s cubic-bezier(0.4, 0.2, 0.2, 1) forwards;
  z-index: 10;
  pointer-events: auto;
}

.other-info.hide {
  animation: slideOutToLeft 0.6s cubic-bezier(0.4, 0.2, 0.2, 1) forwards;
}

/* Hide widget when .other-info.show is present on mobile */
@media (max-width: 600px) {
  .other-info.show ~ .widget,
  .widget:has(+ .other-info.show) {
    display: none !important;
  }
}

@media (min-width: 600px) {
  #otherinfoBtn2 {
    display: none;
  }
}

.oi-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
}

.sharelinks img {
  width: auto;
  height: 50px;
  padding: 0.2rem;
}

.tagline {
  position: fixed;
  top: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  z-index: 10;
  pointer-events: none;
}

