/* PromptWizard Custom Styles */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --border-radius: 0.375rem;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --transition: all 0.15s ease-in-out;
}

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

/* Remove padding when landing page is shown */
body.landing-active {
  padding-top: 0;
}

/* Add padding when app content is shown */
body.app-active {
  padding-top: 76px;
}

/* Simple YouTube Video Background */
.youtube-video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
}

.youtube-video-background iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 aspect ratio */
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
}

/* Animated Hero Background - Fallback */
.hero-animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* YouTube Reference Link */
.youtube-reference {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.youtube-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: #dc3545;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.youtube-link:hover {
  background: rgba(255, 255, 255, 1);
  color: #dc3545;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.youtube-link i {
  font-size: 1.2rem;
}

.hero-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
  z-index: -1;
}

/* Fallback for older video background styles */
.hero-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
}

/* Dashboard Video Background */
.dashboard-section {
  min-height: 100vh;
  position: relative;
}

.dashboard-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
}

.dashboard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
  z-index: -1;
}

.dashboard-section .container-fluid {
  position: relative;
  z-index: 1;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.dashboard-section h2 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dashboard-section .text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
  min-height: 70vh;
  position: relative;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

/* Card Styles */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  background-color: var(--light-color);
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

/* Button Styles */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
  transform: translateY(-1px);
}

/* Form Styles */
.form-control {
  border-radius: var(--border-radius);
  border: 1px solid #ced4da;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Dashboard Styles */
.dashboard-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.dashboard-card .card-body {
  padding: 2rem;
}

.dashboard-card h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dashboard-card p {
  opacity: 0.9;
  margin-bottom: 0;
}

/* Skill Progress Bars */
.skill-progress {
  margin-bottom: 1rem;
}

.skill-progress .progress {
  height: 8px;
  border-radius: 4px;
  background-color: #e9ecef;
}

.skill-progress .progress-bar {
  border-radius: 4px;
  transition: width 0.6s ease;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Prompt Editor */
.prompt-editor {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}

.prompt-textarea {
  min-height: 200px;
  resize: vertical;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Template Content Display - Fixed Height with Scroll */
.template-content {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

.template-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.template-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.template-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.template-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Interactive Template Editor - Simplified Fixed Height with Scroll */
#interactive-template-editor {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 0;
}

#interactive-template-editor::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#interactive-template-editor::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#interactive-template-editor::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

#interactive-template-editor::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Simplified template editor pre element */
#interactive-template-editor pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: inherit;
  word-wrap: inherit;
}

.prompt-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.prompt-controls .form-select {
  flex: 1;
  min-width: 150px;
}

/* Response Display */
.response-container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-top: 1rem;
}

.response-text {
  background-color: #f8f9fa;
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-family: 'Georgia', serif;
  line-height: 1.6;
}

/* Evaluation Scores */
.evaluation-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.score-item {
  text-align: center;
  padding: 1rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.score-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.score-label {
  font-size: 0.875rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Assessment Styles */
.assessment-card {
  border-left: 4px solid var(--primary-color);
}

.question-container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.question-number {
  background-color: var(--primary-color);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 1rem;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.option-item {
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.option-item:hover {
  border-color: var(--primary-color);
  background-color: #f8f9fa;
}

.option-item.selected {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.1);
}

/* Analytics Charts */
.chart-container {
  position: relative;
  height: 300px;
  margin: 1rem 0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Learning Path */
.learning-path {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.module-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.module-item:hover {
  transform: translateX(5px);
}

.module-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
}

.module-completed {
  background-color: var(--success-color);
  color: white;
}

.module-current {
  background-color: var(--primary-color);
  color: white;
}

.module-locked {
  background-color: var(--secondary-color);
  color: white;
}

.module-content {
  flex: 1;
}

.module-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.module-description {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

/* Help System */
.help-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.help-topic {
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.help-topic:hover {
  border-color: var(--primary-color);
  background-color: #f8f9fa;
}

.help-topic-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.help-topic-description {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .prompt-controls {
    flex-direction: column;
  }
  
  .evaluation-scores {
    grid-template-columns: 1fr;
  }
  
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-card h3 {
    font-size: 2rem;
  }
  
  /* Mobile adjustments for YouTube reference */
  .youtube-reference {
    top: 10px;
    right: 10px;
  }
  
  .youtube-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .youtube-link span {
    display: none;
  }
  
  .youtube-link i {
    font-size: 1.1rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* Practice Module Styles */
.task-item {
  transition: var(--transition);
  cursor: pointer;
}

.task-item:hover {
  background-color: #f8f9fa !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-1px);
}

.task-item.border-primary {
  border-color: var(--primary-color) !important;
  background-color: rgba(13, 110, 253, 0.05) !important;
}

.task-item .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

.cursor-pointer {
  cursor: pointer;
}

.text-purple {
  color: #6f42c1 !important;
}

/* Task Description Styles */
#task-description {
  border-left: 4px solid var(--info-color);
  background-color: rgba(13, 202, 240, 0.1);
  border-color: rgba(13, 202, 240, 0.2);
}

#task-description h6 {
  color: var(--info-color);
  margin-bottom: 0.75rem;
}

#task-description .bg-light {
  background-color: rgba(248, 249, 250, 0.8) !important;
  border: 1px solid #dee2e6;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
}

/* Enhanced Prompt Editor */
.prompt-textarea {
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
}

.prompt-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Response and Analysis Cards */
#response-container .card,
#analysis-container .card {
  border-left: 4px solid var(--success-color);
  animation: slideInUp 0.3s ease-out;
}

#analysis-container .card {
  border-left-color: var(--warning-color);
}

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

/* Progress bars in analysis */
.progress {
  background-color: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  transition: width 0.8s ease;
  background: linear-gradient(45deg, var(--primary-color), #0b5ed7);
}

.progress-bar.bg-success {
  background: linear-gradient(45deg, var(--success-color), #146c43) !important;
}

/* Button enhancements */
.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
}

.btn-group .btn:last-child {
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

/* Loading states for buttons */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.fa-spinner {
  animation: spin 1s linear infinite;
}

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

/* Quick tips styling */
.card .list-unstyled li {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card .list-unstyled li:last-child {
  border-bottom: none;
}

/* Responsive adjustments for practice module */
@media (max-width: 768px) {
  .task-item {
    margin-bottom: 0.5rem;
  }
  
  .task-item .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .task-item .badge {
    margin-top: 0.5rem;
    align-self: flex-end;
  }
  
  #task-description .row {
    flex-direction: column;
  }
  
  #task-description .col-md-4 {
    margin-top: 1rem;
  }
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-sm {
  box-shadow: var(--box-shadow) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Document Builder Styles */
.template-item {
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid #dee2e6;
}

.template-item:hover {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.05);
  transform: translateY(-1px);
}

.recent-doc-item {
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid #dee2e6;
}

.recent-doc-item:hover {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.05);
  transform: translateY(-1px);
}

.section-card {
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid #dee2e6;
}

.section-card:hover {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.content-preview {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #495057;
}

/* Chat Message Styles */
.message {
  animation: messageSlideIn 0.3s ease-out;
}

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

.user-message .message-content {
  max-width: 80%;
}

.ai-message .message-content {
  max-width: 85%;
}

.avatar {
  flex-shrink: 0;
  font-size: 0.8rem;
}

/* Typing Indicator */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #6c757d;
  animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingDot {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Quality Analysis Styles */
.analysis-category-card {
  transition: var(--transition);
  cursor: pointer;
}

.analysis-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.quality-analysis {
  animation: slideInUp 0.4s ease-out;
}

/* Document Progress */
.progress {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  transition: width 0.6s ease;
  background: linear-gradient(45deg, var(--primary-color), #0b5ed7);
}

/* Section Status Icons */
.section-card .fas {
  transition: var(--transition);
}

.section-card:hover .fas {
  transform: scale(1.1);
}

/* Interaction History */
.interaction-item {
  transition: var(--transition);
  border: 1px solid transparent;
}

.interaction-item:hover {
  border-color: #dee2e6;
  background-color: #f8f9fa !important;
}

/* Template Preview */
#template-preview {
  animation: fadeInDown 0.3s ease-out;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  background-color: #f8f9fa;
  padding: 1rem;
}

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

/* Document Export Styles */
.export-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.export-option {
  text-align: center;
  padding: 1rem;
  border: 2px solid #dee2e6;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.export-option:hover {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.05);
}

.export-option i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Responsive Design for Document Builder */
@media (max-width: 768px) {
  #document-sidebar {
    margin-bottom: 1rem;
  }
  
  .section-card .card-header {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .section-card .card-header .d-flex:last-child {
    margin-top: 0.5rem;
    align-self: flex-end;
  }
  
  .user-message .message-content,
  .ai-message .message-content {
    max-width: 95%;
  }
  
  .avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.7rem;
  }
}

/* Document Builder Welcome Screen */
.document-builder-welcome {
  text-align: center;
  padding: 3rem 1rem;
}

.document-builder-welcome .fa-file-alt {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.document-builder-welcome h3 {
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.document-builder-welcome .lead {
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

/* Section Content Editor */
#section-content-editor {
  font-family: 'Georgia', serif;
  line-height: 1.6;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
}

#section-content-editor:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Quality Metrics Panel */
#quality-metrics .badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
}

#quality-metrics .h6 {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Chat Input Styling */
#chat-input {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  resize: none;
}

#chat-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Send Button */
#send-chat-btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0.75rem 1rem;
}

/* Profile Page Styles */
.profile-avatar {
  position: relative;
  display: inline-block;
}

.profile-avatar img,
.profile-avatar > div {
  border: 4px solid #fff;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.profile-completion-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.profile-completion-card .progress {
  background-color: rgba(255, 255, 255, 0.2);
}

.profile-completion-card .progress-bar {
  background-color: rgba(255, 255, 255, 0.9);
}

.profile-stats-card {
  transition: var(--transition);
  cursor: pointer;
}

.profile-stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.profile-skill-item {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.profile-skill-item:hover {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.05);
}

.profile-activity-item {
  padding: 1rem;
  border-left: 4px solid var(--primary-color);
  background-color: #f8f9fa;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.profile-activity-item:hover {
  background-color: #e9ecef;
  transform: translateX(2px);
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0.25rem;
}

.profile-badge.level-beginner {
  background-color: #e3f2fd;
  color: #1976d2;
}

.profile-badge.level-intermediate {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.profile-badge.level-advanced {
  background-color: #e8f5e8;
  color: #388e3c;
}

.profile-badge.level-expert {
  background-color: #fff3e0;
  color: #f57c00;
}

.profile-form-section {
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #fff;
}

.profile-form-section h6 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.profile-preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.profile-preference-item {
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  background-color: #f8f9fa;
}

.profile-preference-item h6 {
  color: var(--dark-color);
  margin-bottom: 0.75rem;
}

.profile-learning-path {
  position: relative;
}

.profile-learning-path::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-color), var(--success-color));
}

.profile-learning-step {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}

.profile-learning-step::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.profile-learning-step.completed::before {
  background-color: var(--success-color);
  box-shadow: 0 0 0 2px var(--success-color);
}

.profile-learning-step.current::before {
  background-color: var(--warning-color);
  box-shadow: 0 0 0 2px var(--warning-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 2px var(--warning-color);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.3);
  }
  100% {
    box-shadow: 0 0 0 2px var(--warning-color);
  }
}

.profile-metric {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  transition: var(--transition);
}

.profile-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.profile-metric .metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--info-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-metric .metric-label {
  font-size: 0.875rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.profile-welcome-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.profile-welcome-banner h3 {
  margin-bottom: 1rem;
}

.profile-welcome-banner p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.profile-completion-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.profile-completion-circle {
  position: relative;
  width: 60px;
  height: 60px;
}

.profile-completion-circle svg {
  transform: rotate(-90deg);
}

.profile-completion-circle .completion-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Responsive Design for Profile */
@media (max-width: 768px) {
  .profile-preferences-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-metric .metric-value {
    font-size: 2rem;
  }
  
  .profile-learning-step {
    padding-left: 2.5rem;
  }
  
  .profile-welcome-banner {
    padding: 1.5rem;
  }
  
  .profile-completion-indicator {
    flex-direction: column;
    text-align: center;
  }
}

/* Modal Styles */
.modal-lg {
  max-width: 900px;
}

.modal-dialog {
  margin: 1rem auto;
}

/* Step 4 Create Prompt Modal - Extra Wide */
#step4WorkflowModal .modal-dialog {
  max-width: 95vw;
  width: 95vw;
  margin: 0.5rem auto;
}

#step4WorkflowModal .modal-content {
  height: 90vh;
  max-height: 90vh;
}

#step4WorkflowModal .modal-body {
  height: calc(90vh - 120px);
  overflow-y: auto;
  padding: 0;
}

/* Responsive adjustments for Step 4 modal */
@media (max-width: 768px) {
  #step4WorkflowModal .modal-dialog {
    max-width: 98vw;
    width: 98vw;
    margin: 0.25rem auto;
  }
  
  #step4WorkflowModal .modal-content {
    height: 95vh;
    max-height: 95vh;
  }
  
  #step4WorkflowModal .modal-body {
    height: calc(95vh - 120px);
  }
}

/* Registration Modal Specific Styles */
#registerModal .modal-dialog {
  max-width: 800px;
  margin: 0.5rem auto;
}

#registerModal .modal-body {
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
}

#registerModal .modal-content {
  max-height: 95vh;
}

/* Profession Setup Card Styling */
#registerModal .card {
  border: 1px solid #dee2e6;
  margin-bottom: 1rem;
}

#registerModal .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
}

#registerModal .card-body {
  padding: 1rem;
}

/* Form field spacing in registration */
#registerModal .mb-3 {
  margin-bottom: 1rem !important;
}

#registerModal .form-text {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* Generated Profile Container */
#generated-profile-container {
  margin-top: 1rem;
  animation: slideInDown 0.3s ease-out;
}

#generated-profile-container .card {
  border: 2px solid #198754;
}

#generated-profile-container .card-header {
  background-color: #d1e7dd;
  border-bottom: 1px solid #198754;
}

/* Ensure modal scrolls properly on mobile */
@media (max-width: 768px) {
  #registerModal .modal-dialog {
    margin: 0.25rem;
    max-width: calc(100% - 0.5rem);
  }
  
  #registerModal .modal-body {
    max-height: 85vh;
    padding: 1rem;
  }
  
  #registerModal .modal-content {
    max-height: 95vh;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --light-color: #343a40;
    --dark-color: #f8f9fa;
  }
  
  body {
    background-color: #1a1a1a;
    color: #f8f9fa;
  }
  
  .card {
    background-color: #2d3748;
    color: #f8f9fa;
  }
  
  .form-control {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #f8f9fa;
  }
  
  .response-text {
    background-color: #2d3748;
    color: #f8f9fa;
  }
  
  .template-item,
  .recent-doc-item,
  .section-card {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #f8f9fa;
  }
  
  .content-preview {
    color: #cbd5e0;
  }
  
  #template-preview {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #f8f9fa;
  }
  
  .profile-form-section {
    background-color: #2d3748;
    border-color: #4a5568;
  }
  
  .profile-preference-item {
    background-color: #4a5568;
    border-color: #718096;
  }
  
  .profile-activity-item {
    background-color: #4a5568;
  }
  
  .profile-metric {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  }
}
