/**
 * Profile Page Styles - Enhanced with Expandable Sections and Animations
 */

/* ============================
   ANIMATIONS
   ============================ */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ============================
   HEADER NAVIGATION
   ============================ */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(165, 29, 42, 0.95);
  padding: 1rem 2rem;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.download-btn {
  background: transparent;
  border: 2px solid white;
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s;
  text-decoration: none;
}

.download-btn:hover {
  background: white;
  color: #a51d2a;
}

/* ============================
   PROFILE CONTAINER
   ============================ */
.profile-container {
  min-height: calc(100vh - 80px);
  padding: 150px 0 4rem;
  background: #f5f5f5;
}

/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  animation: slideInUp 0.5s ease;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a51d2a 0%, #d32f2f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  box-shadow: 0 8px 24px rgba(165, 29, 42, 0.3);
  flex-shrink: 0;
}

.profile-header-info {
  flex: 1;
}

.profile-header-info h1 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.profile-header-info p {
  color: #666;
  font-size: 1rem;
  margin: 0 0 1rem 0;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #E0E0E0;
  font-size: 0.875rem;
  color: #666;
}

.profile-status.status-pro {
  background: rgba(165, 29, 42, 0.1);
  border-color: rgba(165, 29, 42, 0.3);
  color: #a51d2a;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #808080;
  animation: pulse 2s infinite;
}

.status-pro .status-dot {
  background: #a51d2a;
  box-shadow: 0 0 8px rgba(165, 29, 42, 0.6);
}

/* Profile Sections */
.profile-sections {
  display: grid;
  gap: 2rem;
}

/* ============================
   EXPANDABLE CARDS
   ============================ */
.expandable-card {
  background: white;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  animation: slideInUp 0.5s ease;
}

.expandable-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.expandable-card.expanded {
  border-color: #a51d2a;
}

.expandable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s;
  border-bottom: 1px solid transparent;
}

.expandable-card.expanded .expandable-header {
  border-bottom-color: #E0E0E0;
  background: rgba(165, 29, 42, 0.02);
}

.expandable-header:hover {
  background: rgba(165, 29, 42, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-left svg {
  color: #a51d2a;
}

.header-left h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  text-transform: uppercase;
}

.expand-icon {
  transition: transform 0.3s ease;
  color: #666;
}

.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.expandable-content.expanded {
  max-height: 2000px;
}

/* ============================
   SUBSCRIPTION INFO
   ============================ */
.subscription-info {
  padding: 2rem;
}

.subscription-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.subscription-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s;
  opacity: 0;
}

.subscription-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
}

.stat-value.status-active {
  color: #10b981;
}

.grace-period-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  color: #f59e0b;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease;
}

.grace-period-notice svg {
  flex-shrink: 0;
}

/* Free Plan Card */
.free-plan-card {
  text-align: center;
  padding: 2rem;
}

.free-plan-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: rgba(165, 29, 42, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.free-plan-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

.free-plan-card p {
  color: #666;
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #333;
  font-size: 1rem;
}

.feature-list svg {
  flex-shrink: 0;
}

/* ============================
   FORM STYLES
   ============================ */
.profile-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #a51d2a;
  box-shadow: 0 0 0 3px rgba(165, 29, 42, 0.1);
}

.form-input::placeholder {
  color: #808080;
}

.form-error {
  color: #FF1744;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
}

.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #808080;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.3s;
}

.password-toggle:hover {
  color: #a51d2a;
}

.password-requirements {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.password-requirements small {
  color: #666;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ============================
   SUBSCRIPTION ACTIONS
   ============================ */
.subscription-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================
   BUTTONS
   ============================ */
.btn-primary {
  background: #000;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background: transparent;
  color: #a51d2a;
  border: 2px solid #a51d2a;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-outline:hover {
  background: #a51d2a;
  color: white;
}

.btn-block {
  width: 100%;
}

/* ============================
   LOADING STATES
   ============================ */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #e0e0e0 50%,
    #f0f0f0 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #E0E0E0;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none !important;
}

/* ============================
   FOOTER
   ============================ */
footer {
  background: #0a1628;
  color: white;
  padding: 30px 0;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-bottom {
  text-align: center;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */
@media (max-width: 968px) {
  .nav-links {
    display: none;
  }
  
  header {
    padding: 1rem;
  }
  
  .navbar-actions {
    gap: 0.5rem;
  }
  
  .download-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  .profile-container {
    padding: 120px 1rem 2rem;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .profile-avatar-large {
    width: 100px;
    height: 100px;
    font-size: 2rem;
  }
  
  .profile-header-info h1 {
    font-size: 2rem;
  }
  
  .subscription-details-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-form {
    padding: 1.5rem;
  }
  
  .subscription-info {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .profile-container {
    padding: 100px 1rem 2rem;
  }
  
  .header-left h2 {
    font-size: 1.25rem;
  }
  
  .expandable-header {
    padding: 1rem 1.5rem;
  }
}