/* Header Actions & Buttons */
.header-actions {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.icon-btn {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--soft-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  font-size: var(--icon-md);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-0.125rem);
}

.notification-badge {
  position: absolute;
  top: -0.3125rem;
  right: -0.3125rem;
  background: var(--error-color);
  color: white;
  font-size: 0.625rem;
  font-weight: bold;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--deep-black);
}

.profile-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 2.5rem !important;
  padding: 0.3125rem 1.2rem 0.3125rem 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  min-width: 160px !important;
  width: auto !important;
  height: 2.75rem !important;
  white-space: nowrap !important;
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--warm-gold) !important;
}

.profile-placeholder {
  width: 2.25rem !important;
  height: 2.25rem !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-size: var(--font-sm) !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.profile-placeholder img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.profile-name {
  color: var(--soft-white) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: 180px !important;
  display: inline-block !important;
}

/* Mobile - hide name on small screens, keep button compact */
@media (max-width: 480px) {
  .profile-name {
    display: none !important;
  }
  .profile-btn {
    padding: 0.3125rem 0.5rem !important;
    min-width: auto !important;
  }
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: 3.75rem;
  right: 0;
  width: 15.625rem;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.625rem);
  transition: all 0.3s ease;
  z-index: 1000;
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-header {
  padding: 15px;
  border-bottom: 1px solid var(--card-border);
}

.profile-dropdown-header h4 {
  font-size: 14px;
  color: var(--soft-white);
  margin: 0;
}

.profile-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.profile-item.active {
  background: rgba(29, 78, 216, 0.2);
  border: 1px solid var(--bantu-blue);
}

.profile-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-initials {
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.profile-item .profile-name {
  flex: 1;
  font-size: 14px;
}

.profile-item i {
  color: var(--success-color);
}

.profile-dropdown-footer {
  padding: 15px;
  border-top: 1px solid var(--card-border);
}

.text-btn {
  background: none;
  border: none;
  color: var(--warm-gold);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
  padding: 8px;
  border-radius: 6px;
}

.text-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--soft-white);
}

/* RSA Badge */
.rsa-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #007A4D, #FFB81C, #E03C31);
  padding: 0.375rem 0.75rem;
  border-radius: 1.875rem;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Category Tab Styling */
.category-tab {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--slate-grey);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  text-align: center;
}

.category-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--warm-gold);
  color: var(--soft-white);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  border-color: transparent;
  color: var(--soft-white);
  box-shadow: 0 4px 15px rgba(29, 78, 216, 0.4);
}

/* Hero Section */
.hero {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px;
  margin: 30px 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--bantu-blue), var(--warm-gold));
  border-radius: 26px;
  z-index: -1;
  opacity: 0.1;
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  margin-bottom: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--soft-white), var(--warm-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: rgba(248, 250, 252, 0.8);
  margin-bottom: 25px;
  font-size: 18px;
}

.hero-btn {
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  color: var(--soft-white);
  border: none;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(29, 78, 216, 0.4);
}

/* Content Card Detailed Styling */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(10px);
  position: relative;
}

.content-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(245, 158, 11, 0.3);
}

.card-thumbnail {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.content-card:hover .card-thumbnail img {
  transform: scale(1.05);
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content-card:hover .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 50px;
  height: 50px;
  background: rgba(245, 158, 11, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-black);
  font-size: 1.5rem;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.content-card:hover .play-icon {
  transform: scale(1);
}

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.card-badge {
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  color: var(--soft-white);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}

.badge-trending {
  background: rgba(245, 158, 11, 0.9);
}

.badge-new {
  background: rgba(29, 78, 216, 0.9);
}

.badge-live {
  background: rgba(239, 68, 68, 0.9);
}

.card-content {
  padding: 15px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  color: var(--soft-white);
  line-height: 1.4;
}

.creator-btn {
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  color: var(--soft-white);
  border: none;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

.creator-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4);
}

.card-stats {
  display: flex;
  gap: 15px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--slate-grey);
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-stat i {
  color: var(--bantu-blue);
  font-size: 12px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--slate-grey);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--warm-gold);
  opacity: 0.5;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 15px 25px;
  border-radius: 12px;
  color: var(--soft-white);
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 300px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.toast i {
  font-size: 18px;
}

.toast.error {
  background: rgba(239, 68, 68, 0.9);
}

.toast.success {
  background: rgba(16, 185, 129, 0.9);
}

.toast.warning {
  background: rgba(245, 158, 11, 0.9);
}

.toast.info {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
  color: var(--soft-white);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 99;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(29, 78, 216, 0.4);
}

/* Notifications Panel */
.notifications-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--card-border);
  z-index: 999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
}

.notifications-panel.active {
  right: 0;
}

.notifications-header {
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-header h2 {
  font-size: 20px;
  font-family: 'Orbitron', sans-serif;
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.notification-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  gap: 12px;
  position: relative;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-5px);
}

.notification-item.unread {
  border-left: 3px solid var(--bantu-blue);
  background: rgba(29, 78, 216, 0.1);
}

.notification-icon {
  color: var(--warm-gold);
  font-size: 18px;
  display: flex;
  align-items: center;
}

.notification-content {
  flex: 1;
}

.notification-content h4 {
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--soft-white);
}

.notification-content p {
  font-size: 12px;
  color: var(--slate-grey);
  margin-bottom: 5px;
}

.notification-time {
  font-size: 11px;
  color: var(--slate-grey);
  opacity: 0.8;
}

.notification-dot {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 8px;
  height: 8px;
  background: var(--error-color);
  border-radius: 50%;
}

.empty-notifications {
  text-align: center;
  padding: 40px 20px;
  color: var(--slate-grey);
}

.empty-notifications i {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.notifications-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
}

.text-btn {
  background: none;
  border: none;
  color: var(--warm-gold);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.text-btn:hover {
  color: var(--soft-white);
  text-decoration: underline;
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 18, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-modal.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

.search-modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-input-container {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  background: var(--deep-navy);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--soft-white);
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--bantu-blue);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.3);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-grey);
}

.close-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  color: var(--soft-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.search-filters {
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 14px;
  color: var(--slate-grey);
  font-weight: 500;
}

.filter-select {
  padding: 10px 15px;
  background: var(--deep-navy);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--soft-white);
  font-size: 14px;
  min-width: 150px;
  cursor: pointer;
}

.search-results {
  padding: 20px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: var(--slate-grey);
  font-size: 16px;
}

/* Analytics Modal */
.analytics-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 18, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.analytics-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

.analytics-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.analytics-header {
  padding: 25px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
}

.analytics-body {
  padding: 25px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.analytics-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.analytics-card h3 {
  font-size: 14px;
  color: var(--slate-grey);
  margin-bottom: 10px;
  font-weight: 500;
}

.analytics-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--warm-gold);
  margin-bottom: 5px;
}

.analytics-trend {
  font-size: 12px;
  color: var(--success-color);
}

.charts-container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  height: 250px;
}

/* Animations */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--deep-navy);
}

::-webkit-scrollbar-thumb {
  background: var(--bantu-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--warm-gold);
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
  .category-tab {
    padding: 8px 16px;
    min-width: 80px;
    font-size: 13px;
  }
  
  .navigation-button-container {
    bottom: 90px !important;
    display: flex;
    justify-content: center;
  }
  
  .navigation-button {
    justify-content: space-around;
    padding: 8px 12px;
  }
  
  .notifications-panel {
    width: 100%;
    right: -100%;
  }
  
  .back-to-top {
    bottom: 160px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 30px 20px;
  }
  
  .hero h1 {
    font-size: 24px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .hero-btn {
    padding: 12px 24px;
    font-size: 16px;
  }
  
  .category-tabs {
    gap: 4px;
  }
  
  .category-tab {
    padding: 6px 12px;
    min-width: 70px;
    font-size: 12px;
  }
  
  .header {
    padding: 8px 14px !important;
    min-height: 48px !important;
  }
  
  .logo-icon {
    width: 30px !important;
    height: 30px !important;
  }
  
  .logo-text {
    font-size: 14px !important;
    max-width: 130px;
  }
  
  .icon-btn, .profile-btn {
    width: 34px !important;
    height: 34px !important;
  }
  
  .navigation-button-container {
    bottom: 85px !important;
    width: calc(100% - 24px) !important;
  }
  
  .navigation-button {
    padding: 7px 12px !important;
    gap: 7px !important;
  }
  
  .nav-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 17px !important;
  }
  
  .back-to-top {
    bottom: 150px;
    width: 40px;
    height: 40px;
    right: 15px;
  }
}

@media (max-width: 360px) {
  .nav-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }
}

/* Accessibility & Touch Targets */
@media (hover: none) and (pointer: coarse) {
  .icon-btn, .profile-btn, .nav-icon, .creator-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  .header, .navigation-button, .footer {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
}
