/* ============================================
        CSS RESET & FONT IMPORT
        ============================================
        */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #1f2128;
  --bg-glass: rgba(26, 28, 35, 0.5);
  --text-primary: #ffffff;
  --text-secondary: #a0a8b3;
  --accent-primary: #00ff88;
  --accent-secondary: #8b5cf6;
  --border-color: rgba(255, 255, 255, 0.1);
  --success-color: #22c55e;
  --error-color: #ef4444;

  --font-family: "Inter", sans-serif;
  --border-radius-lg: 1rem;
  --border-radius-md: 0.75rem;
  --transition-speed-fast: 0.2s;
  --transition-speed-med: 0.4s;
  --cubic-bezier: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: #0f172a;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 15% 25%,
      rgba(0, 255, 136, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 75%,
      rgba(139, 92, 246, 0.15) 0%,
      transparent 40%
    );
  z-index: -1;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, -10px);
  }
}

/* ============================================
        MAIN LAYOUT & SIDEBAR
        ============================================
        */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  transition: transform var(--transition-speed-med) ease;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.sidebar-header .logo {
  color: var(--accent-primary);
}

.nav-menu {
  flex-grow: 1;
}

.nav-list {
  list-style: none;
}

.nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-speed-fast) ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  font-size: 1rem;
  border-color: #6366f1;
}

.nav-item .nav-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: #6366f1;
}

.nav-item .nav-link.active {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2) 0%,
    rgba(79, 70, 229, 0.1) 100%
  );
  color: #f8fafc;
  border-color: #6366f1;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

/* ============================================
        MAIN CONTENT AREA
        ============================================
        */
.main-content {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
}

.section-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeInDown 0.6s var(--cubic-bezier) 0.2s both;
}

.section-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
}

/* ============================================
        CARD & PANEL STYLES
        ============================================
        */
.card {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.8) 0%,
    rgba(15, 23, 42, 0.6) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-speed-med) ease;
  animation: fadeInUp 0.6s var(--cubic-bezier) 0.4s both;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 136, 0.1),
    transparent
  );
  transition: left 0.8s ease;
}

.card:hover::before {
  left: 150%;
}

/* ============================================
        FORM & PROFILE ELEMENTS
        ============================================
        */
.profile-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.profile-picture-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.profile-picture-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent-primary),
    var(--accent-secondary),
    var(--accent-primary)
  );
  filter: blur(15px);
  animation: rotate 5s linear infinite;
  z-index: -1;
}

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

.profile-picture {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-primary);
  transition: transform var(--transition-speed-med) ease;
}

.profile-picture-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-speed-med) ease;
  cursor: pointer;
  font-weight: 500;
}

.profile-picture-overlay svg {
  margin-bottom: 0.5rem;
}

.profile-picture-container:hover .profile-picture-overlay {
  opacity: 1;
}

.profile-picture-container:hover .profile-picture {
  transform: scale(1.05);
}

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

.form-group {
  position: relative;
}

.form-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
  position: absolute;
  top: -0.6rem;
  left: 0.8rem;
  background-color: var(--bg-secondary);
  padding: 0 0.25rem;
}

.info-value,
.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-speed-fast) ease;
}

.info-value {
  min-height: 50px; /* Match input height */
  display: flex;
  align-items: center;
}

.form-input {
  display: none; /* Hide input fields by default */
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.profile-form.edit-mode .info-value {
  display: none;
}
.profile-form.edit-mode .form-input {
  display: block;
}

.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ============================================
        BUTTONS & ACTIONS
        ============================================
        */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed-med) ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background-color: #374151;
  border-color: var(--text-secondary);
}

.edit-actions {
  display: none;
  gap: 1rem;
}
.profile-form.edit-mode #editProfileBtn {
  display: none;
}
.profile-form.edit-mode .edit-actions {
  display: flex;
}

/* ============================================
        TOAST NOTIFICATIONS & ANIMATIONS
        ============================================
        */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}
.toast {
  background-color: var(--bg-secondary);
  border-left: 4px solid;
  border-radius: var(--border-radius-md);
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  min-width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  transition: all 0.5s var(--cubic-bezier);
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.success {
  border-color: var(--success-color);
}
.toast.error {
  border-color: var(--error-color);
}

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

/* ============================================
        RESPONSIVE DESIGN
        ============================================
        */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 1000;
}
@media (max-width: 992px) {
  .profile-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .main-content {
    padding: 6rem 1.5rem 1.5rem;
  }
  .mobile-menu-btn {
    display: block;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* Delete account button */
.delete-account-btn {
  background: linear-gradient(45deg, #ff4757, #ff6b7a);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-smooth);
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
  margin-bottom: 15px;
}

.delete-account-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 71, 87, 0.6);
  background: linear-gradient(45deg, #ff6b7a, #ff4757);
}

.delete-account-btn:active {
  transform: translateY(0);
}
