/* User Profile Modal Styles */

.user-profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.user-profile-modal.visible {
  opacity: 1;
  visibility: visible;
}

.user-profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.user-profile-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.user-profile-modal:not(.visible) .user-profile-content {
  transform: translate(-50%, -50%) scale(0.9);
}

/* Header */
.user-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px 0;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 24px;
}

.user-profile-header h2 {
  margin: 0 0 16px 0;
  font-size: 1.8em;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-profile-close {
  background: none;
  border: none;
  font-size: 2em;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.user-profile-close:hover {
  background: #f0f0f0;
  color: #333;
}

/* Body */
.user-profile-body {
  padding: 0 32px 24px;
}

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

.profile-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.3em;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

/* Profile Fields */
.profile-field {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-field label {
  font-weight: 600;
  color: #555;
  min-width: 120px;
  flex-shrink: 0;
}

.profile-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.profile-save-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.profile-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.profile-save-btn:active {
  transform: translateY(0);
}

.profile-save-btn.success {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.resend-verification-btn {
  background: #ffc107;
  color: #212529;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.resend-verification-btn:hover {
  background: #ffca2c;
  transform: translateY(-1px);
}

.email-verification-notice {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Premium Status */
.premium-status {
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.premium-status.premium {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: white;
}

.premium-status.free {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: #333;
  border: 2px solid #dee2e6;
}

.premium-badge {
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 12px;
}

.free-badge {
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 12px;
  color: #666;
}

.premium-status p {
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.upgrade-premium-btn,
.manage-subscription-btn {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  border: 2px solid currentColor;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.premium-status.free .upgrade-premium-btn {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.upgrade-premium-btn:hover,
.manage-subscription-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Ad Settings */
.ad-settings {
  padding: 16px 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 600;
  color: #333;
}

.toggle-input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 50px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-input:checked + .toggle-slider {
  background: #667eea;
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(26px);
}

.setting-description {
  margin: 8px 0 0 0;
  font-size: 0.9em;
  color: #666;
  line-height: 1.4;
}

/* Security Section */
.security-actions {
  padding: 16px 0;
}

.change-password-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.change-password-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* Footer */
.user-profile-footer {
  padding: 0 32px 32px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #f0f0f0;
  margin-top: 24px;
  padding-top: 24px;
}

.profile-close-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-close-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-profile-content {
    width: 95%;
    margin: 20px;
    max-height: calc(100vh - 40px);
  }

  .user-profile-header,
  .user-profile-body,
  .user-profile-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .profile-field {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .profile-field label {
    min-width: unset;
  }

  .profile-input {
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .user-profile-header h2 {
    font-size: 1.5em;
  }

  .premium-status {
    padding: 16px;
  }

  .toggle-label {
    font-size: 0.9em;
  }
}