:root {
  --bg: #0f0b1f;
  --bg-2: #15102b;
  --panel: #1c1538;
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --text: #f3f0ff;
  --muted: #b9b2d8;
  --danger: #ef4444;
  --success: #22c55e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.topbar {
  background: rgba(21, 16, 43, 0.8);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--primary-2);
  transition: transform 0.3s ease;
  text-decoration: none;
}

.logo:hover {
  transform: scale(1.05);
}

.logo svg {
  transition: transform 0.3s ease;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.35));
}

.brand-logo-fallback {
  align-items: center;
  justify-content: center;
  color: var(--primary-2);
}

.logo:hover svg {
  transform: rotate(15deg);
}

.topnav {
  display: flex;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--muted);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(124, 58, 237, 0.15);
  transform: translateY(-2px);
}

.nav-link.logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.nav-link.profile-link {
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.15);
  color: #efe7ff;
}

.nav-link.nav-link-premium {
  border: 1px solid rgba(218, 165, 32, 0.5) !important;
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.15), rgba(255, 215, 0, 0.1)) !important;
  color: #ffd700 !important;
  box-shadow: 0 0 15px rgba(218, 165, 32, 0.3);
  position: relative;
}

.nav-link.nav-link-premium::before {
  background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.2), transparent);
}

.nav-link.nav-link-premium:hover {
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.25), rgba(255, 215, 0, 0.15)) !important;
  color: #ffed4e !important;
  box-shadow: 0 0 25px rgba(218, 165, 32, 0.5);
}

.premium-star {
  margin-left: 4px;
  animation: twinkle 2s ease-in-out infinite;
  font-size: 16px;
}

.premium-crown {
  margin-left: 6px;
  color: #ffd700;
  animation: bobbing 2s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(218, 165, 32, 0.6));
}

.premium-triangle {
  margin-left: 6px;
  color: #ffd700;
  animation: bobbing 2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(218, 165, 32, 0.7));
  transform: scale(2);
  transform-origin: center;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes bobbing {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

.nav-link.auth-login {
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.nav-link.auth-register {
  color: white;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

.nav-link.auth-register:hover {
  color: white;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.48);
}

.nav-link svg {
  transition: transform 0.3s ease;
}

.nav-link:hover svg {
  transform: scale(1.1);
}

.tilt-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotate(-11deg) translateY(-1px);
  box-shadow: 0 2.5px 10px rgba(220, 38, 38, 0.65)
}

.hero-tilt-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform: rotate(-9deg) translateY(-3px);
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.34);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.mobile-menu-btn:hover {
  background: rgba(124, 58, 237, 0.15);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-content {
    padding: 12px 16px;
  }
  
  .logo {
    font-size: 18px;
  }
  
  .mobile-menu-btn {
    display: block;
    z-index: 1001;
  }
  
  .topnav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(21, 16, 43, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 80px 20px 20px;
    gap: 4px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }
  
  .topnav.active {
    right: 0;
  }
  
  .nav-link {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .tilt-tag {
    transform: rotate(-8deg);
    margin-left: auto;
  }

  .hero-tilt-tag {
    display: inline-flex;
    margin-left: 6px;
    transform: rotate(-8deg) translateY(-2px);
  }
  
  .container {
    padding: 0 16px 32px;
    margin: 16px auto;
  }
  
  .filters {
    margin: 16px auto 20px;
    padding: 0 16px;
  }
  
  .search-container {
    max-width: 100%;
  }
  
  .search-form input {
    padding: 14px 50px 14px 48px;
    font-size: 14px;
  }
  
  .search-icon {
    left: 14px;
  }
  
  .search-btn {
    width: 40px;
    height: 40px;
    right: 4px;
  }
  
  .tag-list {
    gap: 8px;
    justify-content: flex-start;
  }
  
  .tag {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  
  .card-body {
    padding: 12px;
  }
  
  .card-body h3 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .card-body p {
    font-size: 12px;
    min-height: auto;
  }
  
  .tag-pill {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .video-wrapper {
    height: 140px;
  }
  
  .blur-thumbnail {
    height: 140px;
  }
  
  .play-overlay {
    width: 48px;
    height: 48px;
  }
  
  .play-overlay svg {
    width: 32px;
    height: 32px;
  }
  
  .expand-btn {
    width: 32px;
    height: 32px;
    top: 8px;
    right: 8px;
  }
  
  .expand-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .panel {
    padding: 16px;
  }
  
  .panel h1 {
    font-size: 22px;
  }
  
  .panel-form input,
  .panel-form textarea {
    padding: 12px;
    font-size: 14px;
  }
  
  .video-player {
    border-radius: 8px;
  }
  
  .main-video {
    max-height: 50vh;
  }
  
  .video-details {
    padding: 16px;
  }
  
  .video-details h1 {
    font-size: 18px;
  }
  
  .video-list {
    gap: 10px;
  }
  
  .video-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
  }
  
  .video-actions {
    width: 100%;
    justify-content: stretch;
    gap: 6px;
    margin-top: 10px;
  }
  
  .btn-edit,
  .btn-delete {
    flex: 1;
    text-align: center;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .video-wrapper,
  .blur-thumbnail {
    height: 200px;
  }
  
  .tag-list {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
  
  .tag {
    white-space: nowrap;
  }
}

.container {
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 24px 48px;
}

.filters {
  margin: 32px auto 24px;
  max-width: 1400px;
  padding: 0 24px;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-form {
  margin-bottom: 24px;
}

.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  z-index: 1;
  transition: color 0.3s ease;
}

.search-form input {
  width: 100%;
  padding: 16px 56px 16px 52px;
  background: rgba(28, 21, 56, 0.6);
  border: 2px solid rgba(124, 58, 237, 0.2);
  color: var(--text);
  border-radius: 50px;
  font-size: 15px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(28, 21, 56, 0.9);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}

.search-form input:focus + .search-btn,
.search-form input:focus ~ .search-icon {
  color: var(--primary);
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.search-btn:hover {
  background: var(--primary-2);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

.search-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tag {
  padding: 10px 20px;
  background: rgba(28, 21, 56, 0.6);
  border-radius: 25px;
  color: var(--muted);
  border: 2px solid rgba(124, 58, 237, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(168, 85, 247, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tag:hover::before {
  opacity: 1;
}

.tag span {
  position: relative;
  z-index: 1;
}

.tag:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.tag.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.tag.active::before {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: var(--panel);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardFadeIn 0.6s ease backwards;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(n+7) { animation-delay: 0.35s; }

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.4);
}

/* Styles pour les cartes vidéo de la page privée */
.card .thumb {
  position: relative;
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1b1434 0%, #2b1b5b 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  overflow: hidden;
}

.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1b1434 0%, #2b1b5b 100%);
}

.blur-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  display: block;
  pointer-events: none;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(124, 58, 237, 0.8);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.play-overlay:hover {
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.play-overlay svg {
  pointer-events: none;
  display: block;
}

.expand-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 4;
  cursor: pointer;
}

.expand-btn:hover {
  background: var(--primary);
  transform: scale(1.1);
}

.card-info {
  padding: 16px;
}

.card-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.card-info .date {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.tags-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-small {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(124, 58, 237, 0.3);
  border-radius: 6px;
  color: var(--primary);
  font-size: 0.75rem;
  border: 1px solid rgba(124, 58, 237, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.tag-more {
  display: inline-block;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 0.75rem;
}

.thumbnail-placeholder {
  width: 100%;
  height: 170px;
  background: linear-gradient(135deg, #1b1434 0%, #2b1b5b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
  cursor: pointer;
}

.blur-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  transform: scale(1.1);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.video-wrapper:hover .blur-thumbnail {
  filter: blur(15px);
}

.video-wrapper.playing .blur-thumbnail {
  filter: none;
  transform: scale(1);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(124, 58, 237, 0.8);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.video-wrapper:hover .play-overlay {
  background: rgba(124, 58, 237, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-wrapper.playing .play-overlay {
  opacity: 0;
}

.expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.video-wrapper:hover .expand-btn {
  opacity: 1;
}

.expand-btn:hover {
  background: var(--primary);
  transform: scale(1.1);
}

.thumb video {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #09060f;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
  cursor: pointer;
}

.blur-thumbnail {
  filter: blur(20px);
  transform: scale(1.1);
  transition: filter 0.3s ease;
}

.video-wrapper:hover .blur-thumbnail {
  filter: blur(15px);
}

.video-wrapper.playing .blur-thumbnail {
  filter: none;
  transform: scale(1);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(124, 58, 237, 0.8);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: none;
}

.video-wrapper:hover .play-overlay {
  background: rgba(124, 58, 237, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-wrapper.playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin-bottom: 8px;
}

.card-body p {
  color: var(--muted);
  font-size: 14px;
  min-height: 38px;
}

.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  background: #2d2158;
  color: #d9c7ff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.panel {
  background: var(--panel);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #2e2258;
}

.panel h1 {
  margin-bottom: 8px;
}

.panel p {
  color: var(--muted);
  margin-bottom: 18px;
}

.panel-form label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
}

.panel-form input,
.panel-form textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid #33245f;
  color: var(--text);
  border-radius: 8px;
  margin-top: 6px;
}

.panel-form button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.alert.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--danger);
}

.alert.success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid var(--success);
}

.empty {
  color: var(--muted);
  text-align: center;
  margin-top: 40px;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 170px);
  padding: 24px 0;
}

.auth-card {
  width: min(460px, 100%);
  background: rgba(28, 21, 56, 0.85);
  border: 1px solid rgba(124, 58, 237, 0.32);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--muted);
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
}

.login-form input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid #33245f;
  color: var(--text);
  border-radius: 8px;
  margin-top: 6px;
}

.login-form button {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.auth-switch {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--muted);
}

.auth-switch a {
  color: #e7d7ff;
  font-weight: 700;
}

.profile-card {
  width: min(620px, 100%);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  color: var(--muted);
}

.profile-subscription-section {
  margin-bottom: 24px;
}

.profile-subscription-section h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.subscription-card {
  background: rgba(17, 12, 35, 0.72);
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.subscription-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.premium-badge {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(168, 85, 247, 0.35));
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: #efe7ff;
}

.free-badge {
  background: rgba(68, 68, 68, 0.35);
  border: 1px solid rgba(136, 136, 136, 0.45);
  color: #d0d0d0;
}

.subscription-card p {
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.premium-offer {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.price-tag {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
}

.price-tag small {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.btn-premium-upgrade,
.btn-manage-subscription {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.45);
}

.btn-premium-upgrade:hover,
.btn-manage-subscription:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.55);
  color: white;
}

.btn-manage-subscription {
  background: rgba(124, 58, 237, 0.24);
  border: 1px solid rgba(168, 85, 247, 0.52);
  box-shadow: none;
}

.btn-manage-subscription:hover {
  background: rgba(124, 58, 237, 0.35);
}

.premium-required-card {
  text-align: center;
}

.premium-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(168, 85, 247, 0.25));
  border: 2px solid rgba(168, 85, 247, 0.45);
  color: var(--primary-2);
}

.premium-features {
  text-align: left;
  margin: 20px 0;
  padding: 16px;
  background: rgba(17, 12, 35, 0.72);
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.22);
}

.premium-features h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.premium-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.premium-features li {
  padding: 6px 0;
  color: var(--muted);
}

.premium-pricing {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.video-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #33245f;
}

.video-info {
  flex: 1;
}

.video-info h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.video-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.video-actions {
  display: flex;
  gap: 8px;
}

.btn-edit,
.btn-delete,
.btn-cancel {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.btn-edit {
  background: var(--primary);
  color: white;
}

.btn-delete {
  background: var(--danger);
  color: white;
}

.btn-cancel {
  background: #444;
  color: white;
}

.watch-container {
  max-width: 1200px;
  margin: 0 auto;
}

.video-player {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.main-video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  display: block;
}

.video-details {
  background: var(--panel);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #2e2258;
}

.video-details h1 {
  margin-bottom: 12px;
  font-size: 24px;
}

.video-meta {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 14px;
}

.description {
  margin: 16px 0;
  line-height: 1.6;
}

.description p {
  color: var(--text);
}
/* HOME PAGE STYLES */
.home-container {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 84px);
  padding: 2rem 0 3rem;
}

.home-hero-glow {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 760px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28) 0%, rgba(124, 58, 237, 0.08) 40%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  animation: floatGlow 8s ease-in-out infinite;
}

.landing-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
  animation: fadeInUp 0.55s ease;
}

.landing-copy {
  background: rgba(28, 21, 56, 0.64);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(8, 6, 20, 0.4);
}

.landing-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  background: rgba(124, 58, 237, 0.25);
  color: #ddd6ff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.landing-copy h1 {
  font-size: 2.7rem;
  line-height: 1.12;
  margin-bottom: 14px;
}

.landing-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 52ch;
}

.landing-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.55);
}

.btn-secondary {
  color: #e9dcff;
  border: 1px solid rgba(168, 85, 247, 0.5);
  background: rgba(124, 58, 237, 0.15);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(124, 58, 237, 0.25);
}

.landing-logo-wrap {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.landing-banner-frame {
  position: relative;
  z-index: 2;
  width: min(96%, 470px);
  border-radius: 14px;
  overflow: visible;
  border: none;
  background: transparent;
  box-shadow: none;
}

.landing-banner-frame::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.34) 0%, rgba(124, 58, 237, 0.2) 45%, rgba(124, 58, 237, 0.05) 72%, transparent 100%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

.landing-banner-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 16px rgba(168, 85, 247, 0.35),
    0 0 34px rgba(124, 58, 237, 0.28);
}

.landing-logo-wrap::after {
  display: none;
}

.landing-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  border-radius: 14px;
  filter: drop-shadow(0 14px 28px rgba(124, 58, 237, 0.4));
  animation: pulseSoft 4s ease-in-out infinite;
}

.landing-logo-fallback {
  position: relative;
  z-index: 2;
  display: none;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #f4edff, #b98bff 60%, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-logo-wrap.logo-fallback-visible .landing-logo-fallback {
  display: block;
}

.landing-logo-wrap.logo-fallback-visible .landing-banner-frame {
  display: none;
}

.concept-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.concept-card {
  background: rgba(28, 21, 56, 0.62);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.concept-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.55);
}

.concept-card h2 {
  font-size: 1.18rem;
  margin-bottom: 10px;
}

.concept-card p {
  color: var(--muted);
  line-height: 1.6;
}

.pricing-section {
  background: rgba(24, 18, 48, 0.75);
  border-radius: 20px;
  border: 1px solid rgba(124, 58, 237, 0.34);
  padding: 30px;
  box-shadow: 0 16px 36px rgba(8, 6, 20, 0.45);
}

.pricing-section h2 {
  font-size: 1.9rem;
  margin-bottom: 20px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pricing-card {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(17, 12, 35, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-2);
}

.pricing-card.free:hover {
  box-shadow: 0 16px 30px rgba(112, 66, 220, 0.25);
}

.pricing-card.premium {
  background: linear-gradient(165deg, rgba(124, 58, 237, 0.22), rgba(22, 15, 45, 0.85));
  border-color: rgba(168, 85, 247, 0.52);
}

.pricing-card.premium:hover {
  box-shadow: 0 18px 36px rgba(124, 58, 237, 0.35);
}

.plan-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #e6d8ff;
}

.pricing-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 2rem;
  font-weight: 800;
  margin: 4px 0 10px;
}

.plan-price small {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.plan-desc {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 700;
  background: rgba(124, 58, 237, 0.24);
  border: 1px solid rgba(168, 85, 247, 0.52);
  transition: transform 0.25s ease, background 0.25s ease;
}

.plan-cta:hover {
  transform: translateY(-2px);
  background: rgba(124, 58, 237, 0.35);
}

.plan-cta.premium-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: #efe7ff;
  cursor: default;
  pointer-events: none;
  font-size: 0.95rem;
  display: flex;
}

.plan-cta.premium-active:hover {
  transform: none;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(168, 85, 247, 0.25));
}

.plan-cta.premium-active span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-cta.premium-active span::before {
  content: '✓';
  color: #22c55e;
  font-weight: 800;
  font-size: 1.1em;
}

/* Private page: force final behavior (overrides duplicated legacy blocks) */
.card .thumb {
  height: 200px;
}

.card .video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card .blur-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.08);
  pointer-events: none;
}

.card .video-wrapper:hover .blur-thumbnail {
  filter: blur(6px);
  transform: scale(1.05);
}

.card .play-overlay {
  pointer-events: auto;
  z-index: 6;
  text-decoration: none;
}

.card .expand-btn {
  pointer-events: auto;
  z-index: 7;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translateX(-50%) translateY(0px);
  }
  50% {
    transform: translateX(-50%) translateY(16px);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseSoft {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@media (max-width: 768px) {
  .home-container {
    min-height: auto;
    padding-top: 1rem;
  }

  .landing-shell {
    padding: 0 16px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .landing-copy,
  .pricing-section {
    padding: 20px;
  }

  .landing-copy h1 {
    font-size: 2rem;
  }

  .landing-logo-wrap {
    min-height: auto;
  }

  .landing-banner-frame {
    width: min(100%, 380px);
  }

  .landing-logo {
    max-height: none;
  }

  .concept-section,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* NEW PROFILE PAGE WIDGET STYLES */
.profile-container {
  width: 100%;
  min-height: calc(100vh - 84px);
  padding: 40px 24px;
}

.profile-header {
  max-width: 1300px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.5s ease;
}

.profile-header h1 {
  margin-bottom: 8px;
  font-size: 2.2rem;
  color: var(--text);
}

.profile-widgets-grid {
  max-width: 1300px;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  animation: fadeInUp 0.6s ease;
}

.profile-widget {
  background: rgba(28, 21, 56, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.profile-widget:hover {
  transform: translateY(-8px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.25);
}

.widget-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.widget-header svg {
  color: var(--primary-2);
  flex-shrink: 0;
  margin-top: 2px;
  width: 28px;
  height: 28px;
}

.widget-header h2 {
  font-size: 1.25rem;
  margin: 0 0 6px;
  color: var(--text);
}

.widget-header p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.widget-content {
  color: var(--text);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  gap: 12px;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item .label {
  color: var(--muted);
  font-size: 0.95rem;
}

.info-item .value {
  font-weight: 600;
  color: #ddd6ff;
  text-align: right;
}

.security-info {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.widget-content p {
  margin-bottom: 0;
}

.widget-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-2);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: auto;
  padding-top: 8px;
}

.widget-link:hover {
  color: #ffd700;
  transform: translateX(4px);
}

.btn-premium-upgrade-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
  margin-top: auto;
  border: none;
  cursor: pointer;
  width: 100%;
}

.btn-premium-upgrade-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5);
}

.profile-forms-section {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
  animation: fadeInUp 0.7s ease;
}

.profile-forms-section .auth-card {
  width: 100%;
  max-width: none;
  padding: 28px;
}

.profile-forms-section .auth-card h2 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

@media (max-width: 1024px) {
  .profile-widgets-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
  }

  .profile-forms-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .profile-container {
    padding: 32px 16px;
  }
}

@media (max-width: 768px) {
  .profile-container {
    padding: 24px 16px;
    min-height: auto;
  }

  .profile-header {
    margin-bottom: 32px;
  }

  .profile-header h1 {
    font-size: 1.7rem;
  }

  .profile-widgets-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
  }

  .profile-widget {
    padding: 20px;
  }

  .profile-forms-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-forms-section .auth-card {
    padding: 20px;
  }

  .widget-header {
    margin-bottom: 16px;
  }

  .widget-header svg {
    width: 24px;
    height: 24px;
  }

  .widget-header h2 {
    font-size: 1.1rem;
  }

  .widget-header p {
    font-size: 0.85rem;
  }
}

/* ===== Admin Panel Styles ===== */
.admin-panel-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px;
  animation: fadeInUp 0.5s ease;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.panel-header-content {
  flex: 1;
}

.panel-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  background: var(--panel);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--text);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.range-selector {
  background: var(--panel);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.range-selector:hover {
  border-color: var(--primary);
}

.range-selector:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  animation: cardFadeIn 0.5s ease backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.users-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(168, 85, 247, 0.15));
  color: var(--primary);
}

.premium-icon {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(250, 204, 21, 0.15));
  color: #facc15;
}

.premium-star-icon {
  transform: translateX(0.5px);
}

.visits-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  color: #3b82f6;
}

.revenue-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
  color: #22c55e;
}

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 8px 0;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.stat-sublabel {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Charts Row */
.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.chart-card {
  background: var(--panel);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.chart-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.chart-header {
  margin-bottom: 20px;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text);
}

.chart-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.chart-container {
  height: 280px;
  position: relative;
}

/* Panel Section */
.panel-section {
  background: var(--panel);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input {
  background: var(--bg-2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  min-width: 250px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-input::placeholder {
  color: var(--muted);
}

/* Users Table */
.users-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.users-table thead {
  background: rgba(124, 58, 237, 0.1);
}

.users-table th {
  text-align: left;
  padding: 16px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.users-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  color: var(--text);
}

.users-table tbody tr {
  transition: all 0.2s ease;
}

.users-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.05);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}

.user-name {
  font-weight: 500;
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-premium {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(250, 204, 21, 0.2));
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.badge-free {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.badge-admin {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-user {
  background: rgba(124, 58, 237, 0.2);
  color: var(--primary-2);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.status-active {
  color: var(--success);
}

.status-inactive {
  color: var(--muted);
}

.date-cell {
  color: var(--muted);
  font-size: 0.85rem;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--text);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-icon-danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fca5a5;
}

.loading-cell,
.no-data {
  text-align: center;
  padding: 32px !important;
  color: var(--muted);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 16px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.modal-close {
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--text);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

.user-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.info-item {
  background: var(--panel);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.info-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.info-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.activity-section {
  background: var(--panel);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  padding: 20px;
}

.activity-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
}

.activity-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.activity-content {
  max-height: 400px;
  overflow-y: auto;
}

.activity-content::-webkit-scrollbar {
  width: 6px;
}

.activity-content::-webkit-scrollbar-track {
  background: var(--bg-2);
  border-radius: 3px;
}

.activity-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.activity-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.activity-details {
  flex: 1;
}

.activity-action {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.activity-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.activity-date {
  font-size: 0.75rem;
  color: var(--muted);
  display: inline-block;
  margin-left: 8px;
}

.activity-ip {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: monospace;
}

.loading,
.error {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

.error {
  color: var(--danger);
}

/* Responsive */
@media (max-width: 1024px) {
  .charts-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-panel-container {
    padding: 20px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-actions {
    width: 100%;
    justify-content: space-between;
  }

  .range-selector {
    flex: 1;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .charts-row {
    grid-template-columns: 1fr;
  }

  .search-input {
    min-width: 100%;
  }

  .users-table-container {
    overflow-x: auto;
  }

  .users-table {
    min-width: 800px;
  }

  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .user-info-grid {
    grid-template-columns: 1fr;
  }
}