@import url('nav.css');

:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --card-bg: rgba(34, 34, 34, 0.356);
  --card-border: rgba(255, 255, 255, 0.1);
  --error: #ef4444;
  --gray: #94a3b8;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  height: 100vh;
  position: relative;
  background: linear-gradient(135deg, rgb(19, 19, 19) 0%, rgba(46, 46, 46, 0.9) 100%);
  scrollbar-width: none;
}

.main-content::-webkit-scrollbar {
  display: none;
}

.profile-container {
  max-width: 700px;
  margin: 0 auto;
  justify-content: center;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.profile-title {
  color: var(--primary-light);
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
  letter-spacing: -0.5px;
}

/* Enhanced Mode Toggle */
.mode-toggle-container {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 30;
}

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 24px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toggle-track {
  position: relative;
  width: 60px;
  height: 28px;
  background-color: #4CAF50;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label {
  color: white;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Adult mode state */
.mode-toggle[aria-pressed="true"] .toggle-track {
  background-color: #f44336;
}

.mode-toggle[aria-pressed="true"] .toggle-thumb {
  transform: translateX(32px);
}

/* Focus state */
.mode-toggle:focus {
  box-shadow: 0 0 0 3px rgb(255, 255, 255);
  transform: scale(1.05);
}

/* Profile Card - Premium Design */
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), #00c8ff);
  transition: all 0.3s ease;
}

.profile-card:hover::before {
  width: 8px;
}

/* Profile Info Section */
.profile-info {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #00c8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  margin-right: 2.5rem;
  box-shadow: 
    0 5px 15px rgba(37, 99, 235, 0.4),
    inset 0 0 10px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.user-info h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: white;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.user-info p {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.6;
}

/* Details Grid - Enhanced */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.detail-card {
  background: rgba(22, 22, 22, 0.6);
  border-radius: 12px;
  padding: 2rem;
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-card:focus {
  transform: translateY(-5px);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(59, 130, 246, 0.5);
  transform: scale(1.03);
  box-shadow: 0 0 0 4px rgb(255, 255, 255);
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.detail-label {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.detail-value {
  font-size: 1.4rem;
  color: white;
  font-weight: 500;
  line-height: 1.4;
}

/*Subscription Details*/
.subscription-status {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.subscription-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #fff;
}

.subscription-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
}

.subscription-header .material-icons {
  font-size: 24px;
  color: #4CAF50;
}

.subscription-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

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

.detail-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.detail-value {
  color: #fff;
  font-weight: 500;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.active {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.status-badge.expired {
  background-color: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.ads-row .detail-value {
  color: #FFC107;
}

/* Dark mode support */
.dark .subscription-status {
  background-color: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.05);
}

.dark .detail-label {
  color: rgba(255, 255, 255, 0.6);
}

.dark .detail-value {
  color: #f8fafc;
}

/* Focus styles for TV remote navigation */
.subscription-status .focusable:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  transform: scale(1.02);
}

/* Footer & Logout Button */
.footer-content {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.logout-btn {
  background: linear-gradient(to right, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.logout-btn:focus {
  background: linear-gradient(to right, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.4));
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 6px 16px rgba(239, 68, 68, 0.3),
    0 0 0 3px rgba(239, 68, 68, 0.4);
}

/* Loading & Error States */
.loading {
  text-align: center;
  padding: 5rem 0;
  color: var(--primary-light);
  font-size: 1.4rem;
  animation: pulse 1.5s infinite;
}

.error {
  text-align: center;
  padding: 5rem 0;
  color: var(--error);
  font-size: 1.4rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 4K TV Enhancements */
@media (min-width: 1920px) {
  .profile-container {
    max-width: 1100px;
  }
  
  .profile-title {
    font-size: 3rem;
  }
  
  .avatar {
    width: 140px;
    height: 140px;
    font-size: 3.5rem;
  }
  
  .user-info h2 {
    font-size: 2.6rem;
  }
  
  .details-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
  }
  
  .detail-card {
    padding: 2.5rem;
  }
  
  .detail-value {
    font-size: 1.6rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion) {
  * {
    transition: none !important;
    animation: none !important;
  }
}