/* Creado para la aplicación de evaluación de IA: Estilo premium con Glassmorphism y Dark Mode */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --card-bg: rgba(17, 24, 39, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --accent: #a855f7;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --border-radius: 16px;
  --font-sans: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  backdrop-filter: blur(12px);
  background: rgba(9, 13, 22, 0.8);
  border-bottom: 1px solid var(--card-border);
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon::before {
  content: '🧠';
}

/* Main Container */
.container {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Cards & Glassmorphism */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  backdrop-filter: blur(20px);
  padding: 2.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  margin-bottom: 2rem;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 15px 35px -10px rgba(99, 102, 241, 0.1);
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
}

h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.input-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition);
}

.input-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

textarea.input-control {
  min-height: 120px;
  resize: vertical;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

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

/* Steps / Multi-step quiz styling */
.step-container {
  display: none;
}

.step-container.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

/* Question Layout */
.question-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.question-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.question-number {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.question-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 500;
}

.badge-choice {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.badge-open {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

/* Custom radio option selector */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.option-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
}

.option-item input[type="radio"] {
  display: none;
}

.option-bullet {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  margin-right: 0.75rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.option-bullet::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: var(--transition);
}

.option-item input[type="radio"]:checked + .option-bullet {
  border-color: var(--primary);
}

.option-item input[type="radio"]:checked + .option-bullet::after {
  background: var(--primary);
}

.option-item.selected {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 100%;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Admin Dashboard CSS layout */
.admin-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 73px);
  overflow: hidden;
}

.admin-sidebar {
  border-right: 1px solid var(--card-border);
  background: rgba(17, 24, 39, 0.3);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.submissions-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.submission-item {
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.submission-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.submission-item.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.sub-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.sub-email {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sub-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.sub-date {
  color: var(--text-secondary);
}

.status-badge {
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.7rem;
}

.status-graded {
  background: var(--success-glow);
  color: var(--success);
}

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.admin-main {
  padding: 2rem;
  overflow-y: auto;
  height: 100%;
}

/* Statistics Widgets */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.stat-val {
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 0.5rem;
}

.stat-val.success {
  background: linear-gradient(135deg, #34d399, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Grading Detail */
.grade-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
}

.grade-box-big {
  background: var(--primary-glow);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.grade-box-big .val {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.grade-q-list {
  margin-top: 2rem;
}

.grade-q-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.ans-text-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  margin: 0.75rem 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.grading-action-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.grade-slider-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.open-grade-input {
  width: 80px;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.badge-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-correct {
  background: var(--success-glow);
  color: var(--success);
}

.badge-incorrect {
  background: var(--danger-glow);
  color: var(--danger);
}

.correct-ans-show {
  font-size: 0.85rem;
  color: var(--success);
  margin-top: 0.5rem;
}

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

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media(max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .admin-sidebar {
    height: 350px;
  }
  .glass-card {
    padding: 1.5rem;
  }
  h1 {
    font-size: 2rem;
  }
}
