@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Inter:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html.preload *,
html.preload *::before,
html.preload *::after {
  transition: none !important;
  animation: none !important;
}

body {
  font-family: "Inter", "Figtree", sans-serif;
  background-color: #0e0e0e; 
  color: #f1f1f1;
  transition: background-color 1s ease, color 1s ease;
  overflow-x: hidden;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden !important;
}

body.modal-open {
  overflow: hidden !important;
}

body.light-theme {
  background: #f8f8f8;
  color: #181a20;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 70px;
  height: 100vh;
  background: #0e0e0e;
  display: flex;
  align-items: center;
  z-index: 20;
  transition: background 0.45s;
}

body.light-theme .sidebar {
  background: #f8f8f8;
}

.sidebar-bar {
  position: absolute;
  left: 55px;
  top: 5vh;
  height: 90vh;
  width: 1px;
  background: #fff;
  border-radius: 1px;
  transition: background 0.45s;
}

body.light-theme .sidebar-bar {
  background: #111;
}

.sidebar-icons {
  position: absolute;
  left: 0;
  top: calc(5vh + 20px);
  width: 55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.icon-link {
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  outline: none;
  width: 38px;
  height: 38px;
  transition: background 0.2s;
  border-radius: 50%;
}

.icon-link:active,
.icon-link:focus {
  background: rgba(255,255,255,0.09);
}

.icon {
  width: 28px;
  height: 28px;
  transition: filter 0.17s, opacity 0.45s;
  filter: invert(1);
  opacity: 1;
}

body.light-theme .icon {
  filter: none;
}

.icon-link:hover .icon,
.icon-link:focus .icon {
  filter: brightness(2.2) invert(1);
  opacity: 0.85;
}

body.light-theme .icon-link:hover .icon,
body.light-theme .icon-link:focus .icon {
  filter: brightness(0.6);
  opacity: 0.85;
}

.header {
  width: calc(100% - 70px);
  margin-left: 70px;
  display: flex;
  justify-content: center;
  padding: 40px 0 20px 0; 
}

.header-logo {
  width: 250px;
  height: auto;
  transition: all 0.5s ease;
}

body.light-theme .header-logo {
  content: url('../assets/playlistconverter-logo-b.png');
}

.main-content {
  margin-left: 70px;
  width: calc(100% - 70px);
  padding: 20px 40px 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  min-height: calc(100vh - 150px);
}

.ac-profile-section, .ac-stats-grid, .ac-shared-section, .ac-subscription-section, .ac-social-section {
  width: 100%;
  max-width: 900px;
}

.ac-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 30px;
  transition: all 0.3s ease;
  position: relative;
}

body.light-theme .ac-card {
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.05));
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.profile-layout {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.ac-profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

body.light-theme .ac-profile-pic {
  border-color: rgba(0,0,0,0.1);
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-names {
  display: flex;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

body.light-theme .profile-names {
  color: #111;
}

.pseudo-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 350px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.pseudo-input {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

body.light-theme .pseudo-input {
  background: rgba(255,255,255,0.5);
  border-color: rgba(0,0,0,0.1);
  color: #111;
}

.pseudo-input:focus {
  border-color: #1db954;
}

.info-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #ccc;
  font-family: 'Figtree', sans-serif;
  font-style: italic;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

body.light-theme .info-icon-btn {
  background: rgba(0,0,0,0.1);
  color: #555;
}

.info-icon-btn:hover {
  background: #1db954;
  color: #fff;
}

.pseudo-hint {
  font-size: 0.8rem;
  color: #888;
}

.profile-meta {
  margin-top: 5px;
  font-size: 0.9rem;
  color: #666;
}

.profile-actions {
  margin-top: 25px;
  display: flex;
  gap: 15px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
}

body.light-theme .profile-actions {
  border-top: 1px solid rgba(0,0,0,0.05);
}

.ac-btn-primary {
  background: #1db954;
  color: #042014;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 0.95rem;
}

.ac-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29,185,84,0.3);
}

.ac-btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #ddd;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

body.light-theme .ac-btn-outline {
  border-color: rgba(0,0,0,0.2);
  color: #333;
}

.ac-btn-outline:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.05);
}

body.light-theme .ac-btn-outline:hover {
  border-color: #111;
  color: #111;
  background: rgba(0,0,0,0.05);
}

.ac-btn-danger {
  background: rgba(255, 77, 79, 0.1);
  color: #ff4d4f;
  border: 1px solid transparent;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ac-btn-danger:hover {
  background: rgba(255, 77, 79, 0.2);
  border-color: rgba(255, 77, 79, 0.3);
}

.language-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23dddddd%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

body.light-theme .language-select {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

.language-select option {
  background-color: #1a1a1a;
  color: #fff;
}

body.light-theme .language-select option {
  background-color: #fff;
  color: #111;
}

.ac-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
}

.stat-icon-wrapper {
  background: rgba(29,185,84,0.1);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-img {
  width: 24px;
  height: 24px;
  filter: invert(70%) sepia(65%) saturate(459%) hue-rotate(97deg) brightness(88%) contrast(86%); 
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

body.light-theme .stat-value {
  color: #111;
}

.stat-label {
  font-size: 0.9rem;
  color: #bbb;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 0.8rem;
  color: #1db954;
  font-weight: 600;
}

.ac-subscription-section {
  text-align: center;
}

.sub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.sub-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sub-header h2 {
  font-size: 1.4rem;
  color: #fff;
}

body.light-theme .sub-header h2 {
  color: #111;
}

.current-plan-badge {
  background: #1db954;
  color: #042014;
  padding: 5px 12px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.85rem;
}

.sub-desc {
  color: #999;
  font-size: 0.95rem;
  max-width: 500px;
}

.ac-social-section {
  text-align: center;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.social-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-header h2 {
  font-size: 1.4rem;
  color: #fff;
  margin: 0;
}

body.light-theme .social-header h2 {
  color: #111;
}

.social-actions {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #181818;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

body.light-theme .modal-content {
  background: #fff;
  border-color: #eee;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

body.light-theme .modal-header h3 {
  color: #111;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  padding: 5px;
}

.close-modal-btn:hover {
  color: #fff;
}

body.light-theme .close-modal-btn:hover {
  color: #000;
}

.modal-content p {
  color: #ccc;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

body.light-theme .modal-content p {
  color: #555;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1002;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
}

body.light-theme .hamburger-line {
  background-color: #0e0e0e;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0e0e0e 0%, #1a1a1a 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body.light-theme .mobile-menu-overlay {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.4s ease;
  width: 100%;
  z-index: 1001;
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  text-decoration: none;
  color: #f1f1f1;
  font-size: 1.2rem;
  font-weight: 500;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

button.mobile-menu-item {
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

body.light-theme .mobile-menu-item {
  background: rgba(0, 0, 0, 0.05);
  color: #0e0e0e;
}

.mobile-menu-item:hover {
  transform: translateX(10px);
  border-color: #1db954;
  background: rgba(29, 185, 84, 0.1);
}

body.light-theme .mobile-menu-item:hover {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}

.mobile-menu-item img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

body.light-theme .mobile-menu-item img {
  filter: brightness(0) invert(0);
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  
  .header {
    width: 100%;
    margin-left: 0;
    padding: 20px 0;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
  }

  .header-logo {
    width: 200px;
  }

  .profile-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .pseudo-container {
    margin: 0 auto;
  }
  
  .profile-names {
    justify-content: center;
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .ac-btn-outline, .ac-btn-danger, .language-select {
    width: 100%;
    text-align: center;
  }

  .social-actions {
    flex-direction: column;
    width: 100%;
  }

  .social-actions .ac-btn-outline {
    width: 100%;
  }
  
  .ac-stats-grid {
    grid-template-columns: 1fr;
  }
}
/* ─── Transparent modal backgrounds for info modals ─── */
#info-modal .modal-content,
#social-modal .modal-content {
  background: rgba(24, 24, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
body.light-theme #info-modal .modal-content,
body.light-theme #social-modal .modal-content {
  background: rgba(255, 255, 255, 0.9);
}

/* ─── Shared playlists section ─── */
.ac-shared-section {
  margin-top: 0;
}

.shared-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.shared-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.manage-shared-btn {
  font-size: 0.85rem !important;
  padding: 8px 16px !important;
  text-decoration: none;
}

.shared-playlists-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shared-playlist-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
}

.shared-playlist-card:hover {
  background: rgba(255,255,255,0.08);
}

body.light-theme .shared-playlist-card {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
}

body.light-theme .shared-playlist-card:hover {
  background: rgba(0,0,0,0.06);
}

.sp-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.sp-meta {
  font-size: 0.8rem;
  color: #888;
}

.sp-actions {
  display: flex;
  gap: 8px;
}

.sp-copy-btn, .sp-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.sp-copy-btn:hover { background: rgba(29,185,84,0.15); }
.sp-delete-btn:hover { background: rgba(231,76,60,0.15); }

.empty-msg {
  color: #888;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

/* Active toggle state for privacy button */
.active-toggle {
  background: #1db954 !important;
  color: #fff !important;
  border-color: #1db954 !important;
}

/* Premium badge */
.premium-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
