/* ============================================================
   PROFILE MODAL STYLES
   ============================================================ */

.profile-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.profile-modal.visible {
  display: flex;
}

.profile-modal-content {
  background: var(--modal-bg, #1a1a1a);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border-color, #333);
  sticky: top 0;
  background: var(--modal-bg, #1a1a1a);
}

.profile-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.profile-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.profile-modal-close:hover {
  color: var(--text-primary, #fff);
}

.profile-modal-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
}

.profile-modal-body {
  padding: 24px;
}

.profile-picture-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.profile-picture-container {
  position: relative;
  margin-bottom: 16px;
}

.profile-picture-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  object-fit: cover;
  border: 4px solid var(--accent-color, #667eea);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  color: white;
}

.profile-picture-change-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-color, #667eea);
  border: 3px solid var(--modal-bg, #1a1a1a);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.profile-picture-change-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.profile-picture-change-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}

.profile-form-group {
  margin-bottom: 20px;
}

.profile-form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #fff);
}

.profile-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg, #2a2a2a);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  box-sizing: border-box;
}

.profile-input:focus {
  outline: none;
  border-color: var(--accent-color, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-char-count {
  font-size: 12px;
  color: var(--text-secondary, #999);
  margin-top: 6px;
  text-align: right;
}

.profile-email-display {
  padding: 12px 16px;
  background: var(--input-bg, #2a2a2a);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  color: var(--text-secondary, #999);
  font-size: 14px;
}

.profile-modal-footer {
  display: flex;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid var(--border-color, #333);
  background: var(--modal-bg, #1a1a1a);
  justify-content: flex-end;
}

.profile-btn-primary,
.profile-btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-btn-primary {
  background: var(--accent-color, #667eea);
  color: white;
}

.profile-btn-primary:hover {
  background: #5568d3;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.profile-btn-secondary {
  background: var(--input-bg, #2a2a2a);
  color: var(--text-primary, #fff);
  border: 1px solid var(--border-color, #333);
}

.profile-btn-secondary:hover {
  background: var(--border-color, #333);
}

.profile-save-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease-out;
  z-index: 1001;
}

.profile-save-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SETTINGS MODAL STYLES
   ============================================================ */

.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.settings-modal.visible {
  display: flex;
}

.settings-modal-content {
  background: var(--modal-bg, #1a1a1a);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border-color, #333);
  background: var(--modal-bg, #1a1a1a);
  flex-shrink: 0;
}

.settings-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.settings-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.settings-modal-close:hover {
  color: var(--text-primary, #fff);
}

.settings-modal-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
}

.settings-modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-header {
  margin-bottom: 16px;
}

.settings-section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.settings-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color, #333);
}

.settings-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #fff);
}

.settings-options-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .settings-options-group {
    grid-template-columns: 1fr 1fr;
  }
}

.settings-radio-option {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--input-bg, #2a2a2a);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-radio-option:hover {
  border-color: var(--border-color, #333);
}

.settings-radio-option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color, #333);
  border-radius: 50%;
  cursor: pointer;
  margin-right: 10px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.settings-radio-option input[type="radio"]:checked {
  background: var(--accent-color, #667eea);
  border-color: var(--accent-color, #667eea);
}

.settings-radio-option input[type="radio"]:checked::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.radio-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-primary, #fff);
}

.option-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  stroke: currentColor;
  stroke-width: 2;
}

.settings-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.slider-icon {
  font-size: 12px;
  color: var(--text-secondary, #999);
  font-weight: 600;
}

.slider-icon.large {
  font-size: 16px;
}

.settings-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--input-bg, #2a2a2a);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color, #667eea);
  cursor: pointer;
  transition: all 0.2s;
}

.settings-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.settings-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color, #667eea);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.font-preview {
  padding: 12px;
  background: var(--input-bg, #2a2a2a);
  border-radius: 6px;
  color: var(--text-secondary, #999);
  margin-top: 8px;
}

.settings-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg, #2a2a2a);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-select:focus {
  outline: none;
  border-color: var(--accent-color, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.settings-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
}

.settings-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color, #333);
  border-radius: 6px;
  background: var(--input-bg, #2a2a2a);
  cursor: pointer;
  margin-right: 12px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.settings-checkbox:checked {
  background: var(--accent-color, #667eea);
  border-color: var(--accent-color, #667eea);
}

.settings-checkbox:checked::after {
  content: '✓';
  display: block;
  color: white;
  text-align: center;
  font-size: 14px;
  line-height: 16px;
}

.toggle-switch {
  display: inline-block;
  width: 0;
  height: 0;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #fff);
}

.settings-description {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary, #999);
  margin-left: 32px;
}

.settings-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--input-bg, #2a2a2a);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.settings-action-btn:hover {
  background: var(--border-color, #333);
  border-color: var(--accent-color, #667eea);
}

.settings-action-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  margin-right: 12px;
}

.settings-action-btn span {
  flex: 1;
  text-align: left;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  margin-right: 0;
  opacity: 0.5;
  transition: all 0.2s;
}

.settings-action-btn:hover .arrow-icon {
  opacity: 1;
  transform: translateX(4px);
}

.settings-modal-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color, #333);
  background: var(--modal-bg, #1a1a1a);
  flex-shrink: 0;
}

.settings-btn-primary {
  width: 100%;
  padding: 12px 24px;
  background: var(--accent-color, #667eea);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-btn-primary:hover {
  background: #5568d3;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.settings-save-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease-out;
  z-index: 1001;
}

.settings-save-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

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

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */

.theme-light .profile-modal-content,
.theme-light .settings-modal-content {
  --modal-bg: #f5f5f5;
  --border-color: #e0e0e0;
  --input-bg: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
}

.theme-light .profile-input,
.theme-light .settings-select,
.theme-light .settings-radio-option {
  background: #ffffff;
  border-color: #e0e0e0;
  color: #1a1a1a;
}

/* ============================================================
   MOBILE RESPONSIVENESS
   ============================================================ */

@media (max-width: 480px) {
  .profile-modal-content,
  .settings-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .profile-modal-body,
  .settings-modal-body {
    padding: 16px;
  }
  
  .settings-options-group {
    grid-template-columns: 1fr;
  }
  
  .settings-slider-container {
    gap: 8px;
  }
}
