/* ====================================
   RUBRIFYAI - COMPLETE STYLESHEET PART 1
   AI-Powered Rubric-Based Grading Platform
   Base Styles, Variables, Animations
   ==================================== */

/* === BASE STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Purple Theme - Professional & Modern */
  --primary: #9F7AEA;
  --primary-dark: #805AD5;
  --primary-light: #B794F4;
  --secondary: #667EEA;
  --accent: #F093FB;
  --success: #68D391;
  --warning: #F6AD55;
  --danger: #F56565;
  
  /* Purple Gradients */
  --gradient-primary: linear-gradient(135deg, #9F7AEA 0%, #667EEA 100%);
  --gradient-primary-dark: linear-gradient(135deg, #805AD5 0%, #553C9A 100%);
  --gradient-success: linear-gradient(135deg, #68D391 0%, #48BB78 100%);
  --gradient-hero: linear-gradient(135deg, #9F7AEA 0%, #667EEA 50%, #764BA2 100%);
  --gradient-stem: linear-gradient(135deg, #F56565 0%, #ED8936 100%);
  --gradient-humanities: linear-gradient(135deg, #48BB78 0%, #38A169 100%);
  --gradient-glass: linear-gradient(135deg, rgba(159, 122, 234, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
  
  /* Dark Purple Backgrounds */
  --bg-primary: #0F0F23;
  --bg-secondary: #1A1A3E;
  --bg-tertiary: #252550;
  --text-primary: #F7FAFC;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --border: rgba(159, 122, 234, 0.2);
  
  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 80px;
  
  /* Shadows with purple tint */
  --shadow-sm: 0 2px 8px rgba(159, 122, 234, 0.15);
  --shadow-md: 0 4px 16px rgba(159, 122, 234, 0.2);
  --shadow-lg: 0 10px 30px rgba(159, 122, 234, 0.3);
  --shadow-xl: 0 20px 50px rgba(159, 122, 234, 0.4);
  --shadow-glow: 0 0 20px rgba(159, 122, 234, 0.5);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Light Mode Override */
[data-theme="light"] {
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --text-primary: #2D3748;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --border: rgba(159, 122, 234, 0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

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

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

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

/* Animation Classes */
.animate-fade-in { animation: fadeIn 0.8s ease-out; }
.animate-fade-in-delay { animation: fadeIn 0.8s ease-out 0.2s backwards; }
.animate-fade-in-delay-2 { animation: fadeIn 0.8s ease-out 0.4s backwards; }
.animate-fade-in-delay-3 { animation: fadeIn 0.8s ease-out 0.6s backwards; }
.slide-in-left { animation: slideInLeft 0.6s ease-out; }
.slide-in-right { animation: slideInRight 0.6s ease-out; }
.slide-in-down { animation: slideInDown 0.6s ease-out; }
.slide-in-up { animation: slideInUp 0.6s ease-out; }
.slide-down { animation: slideInDown 0.3s ease-out; }
.zoom-in { animation: zoomIn 0.5s ease-out; }

/* === UTILITY CLASSES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-light {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(159, 122, 234, 0.5);
  transform: translateY(-3px);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary-light {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
}

.btn-secondary-light:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-outline.btn-light {
  color: white;
  border-color: white;
}

.btn-outline.btn-light:hover {
  background: white;
  color: var(--primary);
}

.btn-hero {
  padding: 16px 32px;
  font-size: 18px;
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-lg);
  border-radius: 50px;
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(159, 122, 234, 0.5);
}

.btn-hero-light {
  padding: 16px 32px;
  font-size: 18px;
  background: white;
  color: var(--primary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border-radius: 50px;
}

.btn-hero-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
  background: rgba(255, 255, 255, 0.95);
}

.btn-large {
  padding: 18px 40px;
  font-size: 20px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-icon {
  padding: 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--bg-primary);
  color: var(--primary);
  transform: scale(1.1);
}

.btn-danger {
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(245, 101, 101, 0.15);
  color: var(--danger);
}

.btn-submit {
  position: relative;
  overflow: hidden;
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-submit:hover .btn-shine {
  left: 100%;
}

.btn-google {
  background: white;
  color: #333333 !important;
  border: 2px solid var(--border);
  font-weight: 500;
}

.btn-google:hover {
  background: #F8F9FA;
  border-color: var(--primary);
  color: #333333 !important;
}

.btn-google span {
  color: #333333 !important;
}

.google-icon {
  margin-right: 8px;
}

.btn-grade {
  background: var(--gradient-success) !important;
}

.btn-grade:hover {
  box-shadow: 0 8px 20px rgba(81, 207, 102, 0.4) !important;
}

.btn-light-primary {
  background: white !important;
  color: var(--primary) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-light-primary:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-ai {
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%) !important;
}

.btn-ai:hover {
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
}

/* === LANDING PAGE === */
.landing-page {
  background: var(--gradient-hero);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Navigation */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-base);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.logo i {
  font-size: 28px;
  color: white;
}

.nav-buttons {
  display: flex;
  gap: 15px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  z-index: 2;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 40px;
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(0,0,0,0.2);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 60px;
  margin-top: 60px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 800;
  color: white;
  margin-bottom: 5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Animated Background */
.hero-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  font-size: 48px;
  opacity: 0.2;
  animation: float 6s ease-in-out infinite;
}

/* Features Section */
.features-section {
  padding: 100px 20px;
  background: white;
}

[data-theme="dark"] .features-section {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 20px;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.feature-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.feature-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gradient-primary);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
  font-size: 36px;
  color: white;
}

.feature-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

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

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.feature-list i {
  color: var(--success);
  font-size: 18px;
}

/* How It Works */
.how-it-works {
  padding: 100px 20px;
  background: var(--bg-primary);
}

.steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 250px;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.step:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-arrow {
  font-size: 36px;
  color: var(--primary);
  font-weight: 300;
}

/* Recommendations Section */
.recommendations-section {
  padding: 80px 20px;
  background: var(--bg-primary);
}

.recommendations-box {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 30px;
  align-items: center;
  border: 2px solid var(--border);
}

.recommendations-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recommendations-icon i {
  font-size: 36px;
  color: white;
}

.recommendations-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.recommendations-content p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* FAQ Section */
.faq-section {
  padding: 100px 20px;
  background: var(--bg-secondary);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
  user-select: none;
  transition: all var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question i {
  transition: transform var(--transition-base);
  color: var(--primary);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
  padding: 0 25px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 25px 20px;
}

.faq-answer p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
  padding: 100px 20px;
  background: var(--gradient-primary);
  text-align: center;
}

.cta-content h2 {
  font-size: 48px;
  font-weight: 700;
  color: white;
  margin-bottom: 15px;
}

.cta-content p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 40px;
}

.cta-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 15px;
}

/* Footer */
.landing-footer {
  background: #1A202C;
  color: white;
  padding: 60px 20px 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-brand {
  grid-column: span 1;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 10px;
}

.footer-links h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 5px 0;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}
/* ====================================
   RUBRIFYAI CSS PART 2
   Login, Auth, Forms, Alerts
   ==================================== */

/* === LOGIN PAGE === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  position: relative;
  overflow-y: auto;
  padding: 40px 20px;
}

.login-container {
  width: 100%;
  max-width: 480px;
  padding: 40px 20px;
  position: relative;
  z-index: 2;
  margin: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all var(--transition-fast);
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
}

.login-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-xl);
  animation: zoomIn 0.5s ease-out;
  margin-bottom: 30px;
  backdrop-filter: blur(20px);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-large {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: pulse 2s infinite;
}

.logo-large i {
  font-size: 40px;
  color: white;
}

.login-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-header p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  animation: slideInDown 0.3s ease-out;
}

.alert-error {
  background: rgba(245, 101, 101, 0.15);
  color: var(--danger);
  border: 1px solid rgba(245, 101, 101, 0.3);
  backdrop-filter: blur(10px);
}

.alert-success {
  background: rgba(104, 211, 145, 0.15);
  color: var(--success);
  border: 1px solid rgba(104, 211, 145, 0.3);
  backdrop-filter: blur(10px);
}

.alert-info {
  background: rgba(159, 122, 234, 0.15);
  color: var(--primary);
  border: 1px solid rgba(159, 122, 234, 0.3);
  backdrop-filter: blur(10px);
}

.alert-warning {
  background: rgba(246, 173, 85, 0.15);
  color: var(--warning);
  border: 1px solid rgba(246, 173, 85, 0.3);
  backdrop-filter: blur(10px);
}

.alert i {
  font-size: 20px;
}

/* Social Login */
.social-login {
  margin-bottom: 20px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 25px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider span {
  padding: 0 15px;
}

/* Auth Forms */
.auth-form {
  animation: fadeIn 0.4s ease-out;
}

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

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group label i {
  color: var(--primary);
}

.label-badge {
  display: inline-block;
  background: var(--gradient-glass);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-animated,
.textarea-animated,
.select-animated {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition-base);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

[data-theme="light"] .input-animated,
[data-theme="light"] .textarea-animated,
[data-theme="light"] .select-animated {
  background: white;
  border-color: var(--border);
}

.input-animated:focus,
.textarea-animated:focus,
.select-animated:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(159, 122, 234, 0.2);
  transform: translateY(-2px);
  background: var(--bg-secondary);
}

.textarea-animated {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.textarea-large {
  min-height: 200px;
}

/* === FILE UPLOAD AREA === */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.file-upload-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-glass);
  transition: left 0.5s ease;
  z-index: 0;
}

.file-upload-area:hover::before {
  left: 0;
}

.file-upload-area:hover,
.file-upload-area.highlight {
  border-color: var(--primary);
  background: var(--gradient-glass);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.file-upload-area i {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  display: block;
  animation: float 3s ease-in-out infinite;
}

.file-upload-area p {
  color: var(--text-secondary);
  font-size: 15px;
  position: relative;
  z-index: 1;
  margin: 0;
}

.file-upload-area .link-primary {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.file-upload-area .link-primary:hover {
  color: var(--primary-light);
}

.file-upload-area input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 2;
}

#fileName,
#fileNamePrompt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--gradient-glass);
  border-radius: 8px;
  margin-top: 12px;
  animation: slideInDown 0.3s ease-out;
}

#fileName i,
#fileNamePrompt i {
  color: var(--primary);
  font-size: 18px;
}

.help-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-text {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 15px;
  background: var(--bg-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-text {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.link-primary {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.link-primary:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Terms Agreement */
.terms-agreement {
  margin: 15px 0;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.terms-agreement a {
  color: var(--primary);
  text-decoration: none;
}

.terms-agreement a:hover {
  text-decoration: underline;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
}

.checkbox-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.checkbox-label a {
  color: var(--primary);
}

/* Login Features */
.login-features {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.feature-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-mini i {
  font-size: 18px;
}

/* Login Background Animation */
.login-bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.animated-circle {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 8s ease-in-out infinite;
}

/* === ONBOARDING PAGE === */
.onboarding-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  position: relative;
  overflow-y: auto;
  padding: 40px 20px;
}

.onboarding-container {
  width: 100%;
  max-width: 700px;
  padding: 40px 20px;
  position: relative;
  z-index: 2;
  margin: auto;
}

.onboarding-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 50px 40px;
  box-shadow: var(--shadow-xl);
  animation: zoomIn 0.5s ease-out;
  backdrop-filter: blur(20px);
}

.onboarding-header {
  text-align: center;
  margin-bottom: 40px;
}

.onboarding-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.onboarding-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

.onboarding-form {
  animation: fadeIn 0.4s ease-out;
}

.onboarding-question {
  margin-bottom: 40px;
}

.onboarding-question h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.onboarding-question h3 i {
  color: var(--primary);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.option-card {
  position: relative;
  cursor: pointer;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 20px;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: var(--bg-secondary);
  transition: all var(--transition-base);
}

.option-card:hover .option-content {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.option-card.selected .option-content {
  border-color: var(--primary);
  background: var(--gradient-glass);
  box-shadow: var(--shadow-md);
}

.option-content i {
  font-size: 36px;
  color: var(--primary);
}

.option-content span {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.skip-link {
  text-align: center;
  margin-top: 20px;
}

.skip-link a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition-fast);
}

.skip-link a:hover {
  color: var(--primary);
}
/* ====================================
   RUBRIFYAI CSS PART 3
   Dashboard, Sidebar, Navigation - FIXED SPACING & ALIGNMENT
   ==================================== */

/* === DASHBOARD LAYOUT === */
.dashboard-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* === SIDEBAR - COMPLETELY FIXED === */
/* ====================================
   SIDEBAR - COMPLETELY FIXED (FINAL VERSION)
   ==================================== */

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
}

/* === SIDEBAR HEADER - FIXED LAYOUT === */
.sidebar-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  min-height: 80px;
  flex-shrink: 0;
  gap: 12px;
}

.sidebar .logo {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.sidebar .logo i {
  color: var(--primary);
  font-size: 28px;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 700;
  font-size: 20px;
  transition: opacity var(--transition-base), width var(--transition-base);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  line-height: 1.2;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.sidebar-toggle i {
  font-size: 16px;
  transition: transform var(--transition-base);
}

.sidebar-toggle:hover {
  background: var(--bg-primary);
  color: var(--primary);
  transform: scale(1.1);
}


/* === SIDEBAR NAVIGATION === */
.sidebar-nav {
  flex: 1;
  padding: 20px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform var(--transition-fast);
  border-radius: 0 4px 4px 0;
}


.sidebar-link:hover {
  background: var(--bg-primary);
  color: var(--primary);
  transform: translateX(4px);
}

.sidebar-link:hover::before {
  transform: scaleY(1);
}

.sidebar-link.active {
  background: var(--gradient-glass);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.sidebar-link.active::before {
  transform: scaleY(1);
}

.sidebar-link i {
  font-size: 20px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}


.sidebar-link:hover i {
  transform: scale(1.1);
}

.sidebar-link span {
  transition: opacity var(--transition-base);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 12px;
  flex-shrink: 0;
}

/* === SIDEBAR FOOTER === */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  position: relative;
  flex-shrink: 0;
  margin-top: auto;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.user-profile:hover {
  background: var(--bg-primary);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
  transition: opacity var(--transition-base);
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.user-email {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.dropdown-arrow {
  color: var(--text-secondary);
  font-size: 12px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  flex-shrink: 0;
}

/* User Dropdown - HIDE TEXT, SHOW ONLY ICONS */
.user-dropdown {
  position: absolute;
  bottom: 100%;
  left: 16px;
  right: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  margin-bottom: 10px;
  overflow: hidden;
  z-index: 100;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: slideInUp 0.3s ease-out;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.dropdown-item:hover {
  background: var(--bg-primary);
  color: var(--primary);
}

.dropdown-item i {
  font-size: 20px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-item span {
  display: none;
}

/* HIDE TEXT IN DROPDOWN - SHOW ONLY ICONS */
.dropdown-item span {
  display: none;
}

/* === COLLAPSED SIDEBAR STATES === */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header {
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 20px 12px;
  gap: 16px;
}

.sidebar.collapsed .logo {
  width: 100%;
  justify-content: center;
  padding: 0;
  order: 2; /* Logo appears below toggle */
}

.sidebar.collapsed .logo-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-toggle {
  position: static;
  transform: none;
  margin: 0 auto;
}
.sidebar.collapsed .sidebar-toggle {
  order: 1; /* Toggle appears at top */
  margin: 0;
}

.sidebar.collapsed .sidebar-toggle:hover {
  transform: scale(1.1);
}

.sidebar.collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-nav {
  padding: 20px 8px;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 14px 8px;
  gap: 0;
}

.sidebar.collapsed .sidebar-link span {
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-link i {
  width: 100%;
  margin: 0;
}

.sidebar.collapsed .sidebar-link:hover {
  transform: translateX(0) scale(1.05);
}

.sidebar.collapsed .sidebar-divider {
  margin: 16px 8px;
}

.sidebar.collapsed .sidebar-footer {
  padding: 16px 8px;
}

.sidebar.collapsed .user-profile {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .dropdown-arrow {
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .user-dropdown {
  left: 8px;
  right: 8px;
}

/* When collapsed, still hide text in dropdown */
.sidebar.collapsed .dropdown-item {
  justify-content: center;
  padding: 14px 8px;
}

.sidebar.collapsed .dropdown-item span {
  display: none;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }
  
  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .sidebar-header {
    padding: 20px 16px;
    min-height: 70px;
  }
  
  .sidebar-toggle {
    right: 16px;
  }
  
  .sidebar-nav {
    padding: 16px 12px;
  }
  
  .sidebar-link {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .sidebar-footer {
    padding: 14px 12px;
  }
  
  .user-profile {
    padding: 10px;
  }
  
  .user-name {
    font-size: 13px;
  }
  
  .user-email {
    font-size: 11px;
  }
}
/* === MAIN CONTENT === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }
}

/* === TOP BAR === */
.top-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  min-height: 80px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--transition-fast);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: var(--bg-primary);
  color: var(--primary);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  line-height: 1.2;
}

.page-title i {
  color: var(--primary);
  font-size: 28px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Category Badges */
.category-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-general {
  background: linear-gradient(135deg, rgba(159, 122, 234, 0.15) 0%, rgba(159, 122, 234, 0.25) 100%);
  color: var(--primary);
  border: 1px solid rgba(159, 122, 234, 0.3);
}

.badge-stem {
  background: linear-gradient(135deg, rgba(245, 101, 101, 0.15) 0%, rgba(237, 137, 54, 0.25) 100%);
  color: #FF6B6B;
  border: 1px solid rgba(245, 101, 101, 0.3);
}

.badge-humanities {
  background: linear-gradient(135deg, rgba(72, 187, 120, 0.15) 0%, rgba(56, 161, 105, 0.25) 100%);
  color: #48BB78;
  border: 1px solid rgba(72, 187, 120, 0.3);
}

.badge-prompt {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.25) 100%);
  color: #667EEA;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

/* === DASHBOARD CONTAINER === */
.dashboard-container {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: var(--bg-primary);
}

/* === DASHBOARD GRID - FIXED ALIGNMENT === */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-grid-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* === PANELS - FIXED PADDING === */
.panel {
  background: var(--bg-secondary);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.panel:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.panel-header {
  background: var(--gradient-glass);
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  line-height: 1.3;
}

.panel-header h2 i {
  color: var(--primary);
  font-size: 24px;
}

.panel-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

/* === FORMS - FIXED PADDING === */
.rubric-form,
.submit-form {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === SAVED RUBRICS - FIXED SPACING === */
.saved-rubrics {
  padding: 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.saved-rubrics h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}

.saved-rubrics h3 i {
  color: var(--primary);
  font-size: 20px;
}

.rubrics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rubric-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-fast);
}

.rubric-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.rubric-info {
  flex: 1;
  min-width: 0;
}

.rubric-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.rubric-info small {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.rubric-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 8px 0 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.delete-form {
  display: flex;
  flex-shrink: 0;
}

/* === RECENT SUBMISSIONS - FIXED SPACING === */
.recent-submissions {
  padding: 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.recent-submissions h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}

.recent-submissions h3 i {
  color: var(--primary);
  font-size: 20px;
}

.submissions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submission-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.submission-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.submission-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  flex-shrink: 0;
}

.submission-icon-prompt {
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
}

.submission-info {
  flex: 1;
  min-width: 0;
}

.submission-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.submission-info small {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.submission-context {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.submission-arrow {
  color: var(--text-secondary);
  font-size: 18px;
  transition: transform var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.submission-item:hover .submission-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 56px;
  color: var(--border);
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
}

/* === INFO CARDS === */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.info-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition-base);
  align-items: flex-start;
}

.info-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon i {
  font-size: 24px;
  color: white;
}

.info-content {
  flex: 1;
  min-width: 0;
}

.info-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.info-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.badge i {
  font-size: 14px;
}

.timestamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.timestamp i {
  font-size: 16px;
}

/* Prompt Context Display */
.prompt-context-display {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.prompt-context-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.prompt-context-header i {
  font-size: 16px;
}

.prompt-context-display p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* AI Detection Badge */
.ai-detection-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--gradient-glass);
  border-radius: 12px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.ai-detection-badge i {
  color: var(--primary);
  font-size: 18px;
}

.ai-detection-badge strong {
  color: var(--text-primary);
  text-transform: capitalize;
}

.assignment-type-badge {
  background: var(--bg-primary);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
  white-space: nowrap;
}
/* ====================================
   RUBRIFYAI CSS PART 4
   Result Page, Settings, Legal, Structured Feedback
   ==================================== */

/* === RESULT PAGE === */
.result-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px;
}

.result-header {
  margin-bottom: 40px;
  padding: 30px;
  background: var(--bg-secondary);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.result-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.result-title i {
  font-size: 32px;
  color: var(--primary);
  flex-shrink: 0;
}

.result-title h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Result Content */
.result-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Score Card */
.score-card {
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-primary);
}

.score-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.score-header i {
  font-size: 28px;
  color: #FFD43B;
  animation: pulse 2s infinite;
}

.score-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
}

.score-number {
  font-size: 72px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.score-total {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1;
}

.score-percentage {
  display: flex;
  justify-content: center;
}

/* Progress Ring */
.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring-circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.progress-ring-circle {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s ease-in-out;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Criteria & Feedback Cards */
.criteria-card,
.feedback-card,
.submission-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 35px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.card-header i {
  font-size: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.card-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.criterion-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all var(--transition-base);
}

.criterion-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(5px);
}

.criterion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.criterion-header i {
  color: var(--success);
  font-size: 18px;
  flex-shrink: 0;
}

.criterion-header strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.criterion-feedback {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: 28px;
}

.feedback-content {
  margin-bottom: 30px;
}

.feedback-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.submission-content {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  max-height: 400px;
  overflow-y: auto;
}

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

.submission-content::-webkit-scrollbar-track {
  background: transparent;
}

.submission-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.submission-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.submission-content pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ====================================
   STRUCTURED FEEDBACK STYLES
   ==================================== */

/* Structured Feedback Container */
.structured-feedback {
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Feedback Paragraphs */
.structured-feedback .feedback-paragraph {
  margin: 8px 0;
  line-height: 1.7;
}

/* Feedback Lists (Bullet Points) */
.structured-feedback .feedback-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}

.structured-feedback .feedback-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.structured-feedback .feedback-list li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--primary);
  font-weight: bold;
  font-size: 18px;
  line-height: 1.7;
}

/* Ordered Lists (Numbered) */
.structured-feedback .feedback-list-ordered {
  counter-reset: feedback-counter;
  list-style: none;
  margin: 12px 0;
  padding: 0;
}

.structured-feedback .feedback-list-ordered li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 10px;
  line-height: 1.7;
  color: var(--text-secondary);
  counter-increment: feedback-counter;
}

.structured-feedback .feedback-list-ordered li::before {
  content: counter(feedback-counter) ".";
  position: absolute;
  left: 8px;
  color: var(--primary);
  font-weight: bold;
  line-height: 1.7;
}

/* Strong/Bold Text in Feedback */
.structured-feedback strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Section Spacing */
.structured-feedback > p:first-child {
  margin-top: 0;
}

.structured-feedback > p:last-child,
.structured-feedback > ul:last-child,
.structured-feedback > ol:last-child {
  margin-bottom: 0;
}

/* Add spacing between sections */
.structured-feedback strong:not(:first-child) {
  display: block;
  margin-top: 20px;
}

/* Criterion Feedback Specific Styles */
.criterion-feedback.structured-feedback {
  padding-left: 0;
}

/* Light Mode Adjustments */
[data-theme="light"] .structured-feedback .feedback-list li::before,
[data-theme="light"] .structured-feedback .feedback-list-ordered li::before {
  color: var(--primary-dark);
}

/* Print Styles for Feedback */
@media print {
  .structured-feedback .feedback-list li::before {
    color: #000 !important;
  }
  
  .structured-feedback .feedback-list-ordered li::before {
    color: #000 !important;
  }
}

/* Mobile Responsive for Structured Feedback */
@media (max-width: 768px) {
  .structured-feedback .feedback-list li {
    padding-left: 24px;
  }
  
  .structured-feedback .feedback-list li::before {
    left: 4px;
  }
  
  .structured-feedback .feedback-list-ordered li {
    padding-left: 28px;
  }
  
  .structured-feedback .feedback-list-ordered li::before {
    left: 4px;
  }
}

/* === SETTINGS PAGE === */
.settings-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

.settings-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 35px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

.settings-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.settings-header i {
  font-size: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.settings-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

/* === LEGAL PAGES === */
.legal-page {
  background: var(--bg-primary);
  min-height: 100vh;
  padding: 20px;
}

.legal-nav {
  max-width: 900px;
  margin: 0 auto 30px;
}

.legal-container {
  max-width: 900px;
  margin: 0 auto;
}

.legal-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 50px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.legal-content h1 {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.last-updated {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-style: italic;
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
  margin-top: 30px;
  line-height: 1.3;
}

.legal-section h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  margin-top: 20px;
  line-height: 1.3;
}

.legal-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.legal-section ul {
  margin-left: 25px;
  margin-bottom: 15px;
}

.legal-section ul li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.legal-section a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.legal-section a:hover {
  text-decoration: underline;
  color: var(--primary-light);
}

.legal-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--border);
  text-align: center;
}

.legal-footer p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* === LOADING SPINNER === */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotate 1s linear infinite;
  margin: 20px auto;
}

.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

/* === ACCESSIBILITY === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--primary);
  color: white;
}

/* === BACK TO TOP BUTTON === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(159, 122, 234, 0.5);
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }
.w-100 { width: 100%; }
.rounded { border-radius: 8px; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* === THEME TOGGLE === */
.theme-toggle {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.theme-toggle:hover {
  background: var(--gradient-glass);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.theme-toggle i {
  font-size: 20px;
}

/* === NOTIFICATION BADGE === */
.notification-badge {
  position: relative;
}

.notification-badge::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

/* === SKELETON LOADERS === */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-primary) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 16px;
}

.skeleton-card {
  height: 200px;
  border-radius: 12px;
}

/* === TOOLTIPS === */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity var(--transition-base);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--bg-secondary) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* === MODALS === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
  animation: zoomIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-primary);
  color: var(--danger);
  transform: scale(1.1);
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

/* === SMOOTH TRANSITIONS === */
body,
.input-animated,
.textarea-animated,
.select-animated,
.panel,
.score-card,
.feature-card,
.settings-card,
.sidebar,
.main-content {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* ====================================
   RUBRIFYAI CSS PART 5 (FINAL)
   Loading Screen, Responsive, Print Styles
   ==================================== */

/* ====================================
   LOADING SCREEN STYLES
   ==================================== */

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 35, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

[data-theme="light"] .loading-overlay {
  background: rgba(248, 249, 250, 0.98);
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Loading Container */
.loading-container {
  text-align: center;
  max-width: 500px;
  padding: 40px;
}

/* Loading Circle with Progress */
.loading-circle {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 40px;
}

.loading-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.loading-circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
  opacity: 0.3;
}

.loading-circle-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(159, 122, 234, 0.5));
}

/* Loading Percentage */
.loading-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-light) 50%,
    var(--primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-percentage 3s linear infinite;
  line-height: 1;
}

@keyframes shimmer-percentage {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Loading Text */
.loading-text {
  margin-bottom: 40px;
}

.loading-text h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  animation: pulse-text 2s ease-in-out infinite;
}

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

.loading-text p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  min-height: 24px;
  transition: opacity 0.3s ease;
}

/* Loading Steps */
.loading-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.loading-step.active {
  opacity: 1;
  border-color: var(--primary);
  background: var(--gradient-glass);
  box-shadow: 0 4px 15px rgba(159, 122, 234, 0.2);
  transform: scale(1.05);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.2);
  }
  50% {
    box-shadow: 0 4px 25px rgba(159, 122, 234, 0.4);
  }
}

.loading-step.completed {
  opacity: 0.8;
  border-color: var(--success);
}

.loading-step i {
  font-size: 20px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.loading-step.active i {
  color: var(--primary);
}

.loading-step.completed i {
  color: var(--success);
}

.loading-step span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.loading-step.active span {
  color: var(--text-primary);
}

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

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

/* Light Mode Adjustments for Loading */
[data-theme="light"] .loading-step {
  background: white;
}

[data-theme="light"] .loading-step.active {
  background: linear-gradient(135deg, rgba(159, 122, 234, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 1024px) {
  .hero-title { font-size: 52px; }
  .section-title { font-size: 40px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .info-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Landing Page */
  .landing-nav { 
    padding: 15px 20px; 
    flex-wrap: wrap;
  }
  
  .nav-buttons {
    gap: 10px;
  }
  
  .nav-buttons .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .hero { 
    padding: 100px 20px 60px; 
    min-height: auto;
  }
  
  .hero-title { 
    font-size: 36px; 
    margin-bottom: 16px;
  }
  
  .hero-subtitle { 
    font-size: 16px; 
    margin-bottom: 30px;
  }
  
  .hero-buttons {
    gap: 12px;
  }
  
  .hero-stats { 
    gap: 30px; 
    margin-top: 40px;
  }
  
  .stat-number { font-size: 36px; }
  
  .stat-label { font-size: 12px; }
  
  /* Sections */
  .section-title { font-size: 32px; }
  
  .section-subtitle { font-size: 18px; margin-bottom: 40px; }
  
  .features-section, 
  .how-it-works, 
  .faq-section, 
  .cta-section,
  .recommendations-section { 
    padding: 60px 20px; 
  }
  
  .features-grid { 
    grid-template-columns: 1fr; 
    gap: 20px;
  }
  
  .feature-card {
    padding: 30px 24px;
  }
  
  .steps { 
    flex-direction: column; 
    gap: 20px;
  }
  
  .step { 
    min-width: 100%;
    padding: 30px 24px;
  }
  
  .step-arrow { 
    transform: rotate(90deg); 
    margin: 10px 0;
  }
  
  .recommendations-box { 
    flex-direction: column; 
    text-align: center; 
    padding: 30px 24px;
    gap: 24px;
  }
  
  .faq-question {
    font-size: 16px;
    padding: 16px 20px;
  }
  
  .faq-answer {
    padding: 0 20px;
  }
  
  .faq-item.active .faq-answer {
    padding: 0 20px 16px;
  }
  
  .cta-content h2 {
    font-size: 36px;
  }
  
  .cta-content p {
    font-size: 18px;
  }
  
  /* Dashboard */
  .top-bar { 
    padding: 16px 20px;
    min-height: 70px;
  }
  
  .page-title { 
    font-size: 22px; 
  }
  
  .page-title i {
    font-size: 24px;
  }
  
  .dashboard-container { 
    padding: 20px; 
  }
  
  .dashboard-grid { 
    gap: 20px; 
  }
  
  .panel-header { 
    padding: 20px 22px; 
  }
  
  .panel-header h2 {
    font-size: 20px;
  }
  
  .panel-header h2 i {
    font-size: 22px;
  }
  
  .rubric-form, 
  .submit-form, 
  .saved-rubrics, 
  .recent-submissions { 
    padding: 22px; 
  }
  
  .saved-rubrics h3,
  .recent-submissions h3 {
    font-size: 17px;
    margin-bottom: 16px;
  }
  
  .rubric-item,
  .submission-item {
    padding: 14px 16px;
    gap: 12px;
  }
  
  .submission-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  
  /* Result Page */
  .result-container { 
    padding: 20px; 
  }
  
  .result-header {
    padding: 24px;
    margin-bottom: 30px;
  }
  
  .result-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .result-title h1 { 
    font-size: 24px; 
  }
  
  .result-title i {
    font-size: 28px;
  }
  
  .result-meta {
    gap: 12px;
  }
  
  .result-content {
    gap: 24px;
  }
  
  .score-card { 
    padding: 30px 24px; 
  }
  
  .score-number { 
    font-size: 56px; 
  }
  
  .score-total { 
    font-size: 28px; 
  }
  
  .score-header h2 {
    font-size: 22px;
  }
  
  .criteria-card, 
  .feedback-card, 
  .submission-card { 
    padding: 24px 20px; 
  }
  
  .card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }
  
  .card-header h2 {
    font-size: 20px;
  }
  
  .criteria-list {
    gap: 16px;
  }
  
  .criterion-item {
    padding: 16px;
  }
  
  .action-buttons { 
    flex-direction: column; 
  }
  
  .action-buttons .btn { 
    width: 100%; 
  }
  
  /* Settings */
  .settings-container { 
    padding: 20px; 
  }
  
  .settings-grid { 
    grid-template-columns: 1fr; 
    gap: 20px; 
  }
  
  .settings-card { 
    padding: 24px 20px; 
  }
  
  .settings-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }
  
  .settings-header h2 {
    font-size: 18px;
  }
  
  /* Auth Pages */
  .login-container,
  .onboarding-container {
    padding: 30px 20px;
  }
  
  .login-box, 
  .onboarding-box { 
    padding: 30px 24px; 
  }
  
  .login-header h2 {
    font-size: 26px;
  }
  
  .onboarding-header h2 {
    font-size: 28px;
  }
  
  .option-grid { 
    grid-template-columns: 1fr; 
  }
  
  .option-content {
    padding: 24px 20px;
  }
  
  /* Legal Pages */
  .legal-content { 
    padding: 30px 24px; 
  }
  
  .legal-content h1 { 
    font-size: 32px; 
  }
  
  .legal-section h2 {
    font-size: 24px;
  }
  
  .legal-section h3 {
    font-size: 20px;
  }
  
  /* Loading Screen */
  .loading-container {
    padding: 30px 20px;
    max-width: 90%;
  }
  
  .loading-circle {
    width: 160px;
    height: 160px;
    margin-bottom: 30px;
  }
  
  .loading-percentage {
    font-size: 36px;
  }
  
  .loading-text h3 {
    font-size: 22px;
  }
  
  .loading-text p {
    font-size: 14px;
  }
  
  .loading-steps {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 30px;
  }
  
  .loading-step {
    padding: 12px 16px;
  }
  
  .loading-step i {
    font-size: 18px;
  }
  
  .loading-step span {
    font-size: 13px;
  }
  
  /* Modals */
  .modal-content {
    padding: 30px 24px;
    width: 95%;
  }
  
  .modal-header h2 {
    font-size: 22px;
  }
  
  /* Sidebar Mobile */
  .sidebar-header {
    padding: 20px 16px;
    min-height: 70px;
  }
  
  .sidebar-nav {
    padding: 16px 12px;
  }
  
  .sidebar-link {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .sidebar-footer {
    padding: 14px 12px;
  }
  
  .user-profile {
    padding: 10px;
  }
  
  .user-name {
    font-size: 13px;
  }
  
  .user-email {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .hero-title { 
    font-size: 28px; 
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
  
  .section-title { 
    font-size: 28px; 
  }
  
  .section-subtitle {
    font-size: 16px;
  }
  
  .page-title { 
    font-size: 18px; 
  }
  
  .page-title i {
    font-size: 20px;
  }
  
  .score-number { 
    font-size: 48px; 
  }
  
  .score-total { 
    font-size: 24px; 
  }
  
  .nav-buttons { 
    gap: 8px; 
  }
  
  .nav-buttons .btn { 
    padding: 8px 14px; 
    font-size: 13px; 
  }
  
  .btn-hero,
  .btn-hero-light {
    padding: 14px 28px;
    font-size: 16px;
  }
  
  .loading-circle {
    width: 140px;
    height: 140px;
  }
  
  .loading-percentage {
    font-size: 32px;
  }
  
  .loading-text h3 {
    font-size: 20px;
  }
  
  .feature-icon {
    width: 70px;
    height: 70px;
  }
  
  .feature-icon i {
    font-size: 32px;
  }
  
  .info-icon {
    width: 42px;
    height: 42px;
  }
  
  .info-icon i {
    font-size: 20px;
  }
  
  .back-to-top {
    width: 45px;
    height: 45px;
    font-size: 18px;
    bottom: 20px;
    right: 20px;
  }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    max-width: 800px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 56px;
  }
}

/* ====================================
   PRINT STYLES
   ==================================== */

@media print {
  body { 
    background: white; 
    color: black; 
  }
  
  .sidebar, 
  .top-bar, 
  .action-buttons, 
  .mobile-menu-toggle,
  .back-to-top,
  .loading-overlay,
  .btn,
  .landing-nav,
  .hero-buttons,
  .cta-section,
  .landing-footer { 
    display: none !important; 
  }
  
  .main-content { 
    margin-left: 0 !important; 
  }
  
  .result-container,
  .dashboard-container,
  .settings-container,
  .legal-container { 
    max-width: 100%; 
    padding: 20px; 
  }
  
  .score-card, 
  .criteria-card, 
  .feedback-card, 
  .submission-card, 
  .panel,
  .settings-card,
  .legal-content {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  
  .result-header {
    border: 1px solid #ddd;
    box-shadow: none;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: #000;
  }
  
  .structured-feedback .feedback-list li::before,
  .structured-feedback .feedback-list-ordered li::before {
    color: #000 !important;
  }
  
  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ====================================
   ADDITIONAL FIXES & POLISH
   ==================================== */

/* Smooth Scrolling */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(159, 122, 234, 0.5);
  }
  
  .btn,
  .sidebar-link,
  .panel,
  .input-animated,
  .textarea-animated {
    border-width: 2px;
  }
}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg-primary: #0F0F23;
    --bg-secondary: #1A1A3E;
    --bg-tertiary: #252550;
    --text-primary: #F7FAFC;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
  }
}

/* Focus Management */
body:not(.user-is-tabbing) button:focus,
body:not(.user-is-tabbing) input:focus,
body:not(.user-is-tabbing) select:focus,
body:not(.user-is-tabbing) textarea:focus {
  outline: none;
}

/* Selection Styling */
::-moz-selection {
  background: var(--primary);
  color: white;
}

/* Ensure proper box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Remove tap highlight on mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Improve text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  position: relative;
}

/* Fix for iOS Safari bottom bar */
@supports (-webkit-touch-callout: none) {
  .dashboard-body {
    min-height: -webkit-fill-available;
  }
}

/* ====================================
   END OF RUBRIFYAI STYLESHEET
   Complete 3500+ Lines - All Fixed ✨
   Perfect Spacing & Alignment
   ==================================== */
   /* ====================================
   GRADING INTENSITY SLIDER
   ==================================== */

.intensity-slider-container {
  margin: 20px 0;
  padding: 30px 20px;
  background: var(--bg-primary);
  border-radius: 16px;
  border: 2px solid var(--border);
}

.intensity-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 30px;
}

.intensity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(159, 122, 234, 0.4);
  transition: all 0.3s ease;
}

.intensity-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(159, 122, 234, 0.6);
}

.intensity-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(159, 122, 234, 0.4);
  transition: all 0.3s ease;
}

.intensity-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(159, 122, 234, 0.6);
}

.intensity-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.intensity-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 15px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0.6;
}

.intensity-label:hover {
  opacity: 0.8;
  transform: translateY(-3px);
  border-color: var(--primary);
}

.intensity-label.active {
  opacity: 1;
  border-color: var(--primary);
  background: var(--gradient-glass);
  box-shadow: 0 4px 15px rgba(159, 122, 234, 0.3);
}

.intensity-label i {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--primary);
}

.intensity-label strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.intensity-label small {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .intensity-labels {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .intensity-label {
    padding: 16px 12px;
  }
  
  .intensity-label i {
    font-size: 28px;
  }
}