:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary: #06b6d4;
  --secondary-dark: #0891b2;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg-gradient-start: #0a0f2e;
  --bg-gradient-end: #0a0f2e;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
  pointer-events: none;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.site-logo-link {
  display: inline-block;
  transition: var(--transition);
  flex-shrink: 0;
}

.site-logo-link:hover {
  transform: scale(1.05) rotate(-2deg);
}

.site-logo {
  max-width: 250px;
  height: auto;
  display: block;
  
}

.header-text {
  text-align: center;
  flex: 1;
}

.header-text h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  display: block;
  margin-bottom: 0;
}

.academic-year {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  flex: 1;
  width: 100%;
}

/* Card Styles */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  animation: slideUp 0.4s ease-out;
}

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

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

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.card-header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.icon {
  color: var(--primary);
  flex-shrink: 0;
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-required {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Form Elements */
.grid-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: block;
}

.hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border-color);
  background: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
select:hover,
textarea:hover {
  border-color: var(--primary-light);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-icon {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

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

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

.btn-large {
  padding: 16px 40px;
  font-size: 1.1rem;
}

button {
  background: linear-gradient(135deg, var(--text-primary) 0%, #334155 100%);
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Course Section */
.course-section {
  margin-top: 24px;
}

.section-caption {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.course-list,
.long-term-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-list li,
.long-term-list li {
  margin-bottom: 12px;
  transition: var(--transition);
}

.course-list li:hover,
.long-term-list li:hover {
  transform: translateX(4px);
}

.course-list label,
.long-term-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.course-list label:hover,
.long-term-list label:hover {
  background: #f8fafc;
}

.course-list input[type="checkbox"],
.long-term-list input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Grade Block */
.grade-block {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border-color);
}

.grade-block h4 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
}

/* Placeholder */
.placeholder {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px dashed var(--border-color);
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  font-size: 1rem;
}

/* Short Term Container */
.short-term-container > article {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  transition: var(--transition);
}

.short-term-container > article:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.short-term-container header {
  margin-bottom: 16px;
}

.short-term-container header h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.short-term-goal {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.short-term-goal:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.goal-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text-primary);
}

.goal-header select {
  min-width: 160px;
  flex-shrink: 0;
}

/* Actions */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.page-actions {
  margin: 40px 0;
  justify-content: center;
}

/* Environment Section */
.environment-checkbox-wrapper {
  margin-bottom: 20px;
}

.environment-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #f8fafc;
  transition: var(--transition);
}

.environment-checkbox-label:hover {
  background: #f1f5f9;
}

.environment-checkbox-label input[type="checkbox"] {
  margin-right: 12px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

#environmentText {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  resize: vertical;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 120px;
  transition: var(--transition);
}

#environmentText::placeholder {
  color: var(--text-muted);
}

#environmentText:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Plan Section */
.plan-section {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  border: 2px solid var(--primary);
}

.plan-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.plan-header h3 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 800;
}

.plan-actions {
  display: flex;
  gap: 12px;
}

.plan-actions button {
  padding: 10px 20px;
  font-size: 0.95rem;
}

/* Table Styles */
.plan-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: white;
}

.plan-table thead th {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.plan-table tbody td {
  padding: 14px 12px;
  border: 1px solid var(--border-color);
  vertical-align: top;
  color: var(--text-primary);
}

.plan-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.plan-table tbody tr:nth-child(odd) {
  background: white;
}

.plan-table tbody tr:hover {
  background: #f1f5f9;
}

.plan-table .course-heading {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  color: white;
  font-weight: 700;
  text-align: left;
  padding: 12px;
}

/* Intervention Details */
.intervention-details {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: #f8fafc;
  border: 1px solid var(--border-color);
}

.intervention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field label {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* Footer */
.app-footer {
  background: #0a0f2e;
  backdrop-filter: blur(10px);
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

.app-footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-header {
    padding: 16px 20px;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .site-logo {
    max-width: 200px;
  }

  .header-text {
    text-align: center;
  }

  .header-text h1 {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .academic-year {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

  .card {
    padding: 24px 20px;
  }

  .card-header h3 {
    font-size: 1.3rem;
  }

  .grid-three {
    grid-template-columns: 1fr;
  }

  .goal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .goal-header select {
    width: 100%;
  }

  .plan-table {
    font-size: 0.85rem;
  }

  .plan-table thead th,
  .plan-table tbody td {
    padding: 10px 8px;
  }

  .btn-large {
    width: 100%;
  }

  .actions {
    flex-direction: column;
  }

  .page-actions {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 0 16px 40px;
  }

  .header-text h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 20px 16px;
    margin-bottom: 16px;
  }
}

/* Long-term Checkbox Styles */
.long-term-checkbox-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.long-term-checkbox-item {
  display: flex;
  align-items: center;
}

.long-term-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  font-size: 0.95rem;
  user-select: none;
  transition: var(--transition);
}

.long-term-checkbox-label:hover {
  color: var(--primary);
}

.long-term-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.long-term-checkbox-label input[type="checkbox"]:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}



@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}
.note-box {
  margin-top: 15px;
  padding: 12px 15px;
  background-color: #f7f9fc;
  border-left: 4px solid #3b82f6;
  font-size: 13.5px;
  color: #333;
}

.note-box ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.note-box li {
  margin-bottom: 4px;
}

#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  background-color: #3b82f6;
  color: white;
}
.app-header {
background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
padding: 40px 20px;
color: white;
box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.header-content {
display: flex;
align-items: center;
gap: 30px;
flex-wrap: wrap;
}
.site-logo {
width: 250px;
background: #203a43;
padding: 10px;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.main-title {
font-size: 32px;
margin: 0;
font-weight: 700;
}
.subtitle {
font-size: 18px;
opacity: 0.9;
margin-bottom: 20px;
}
.note-box {
background: white;
color: #333;
padding: 20px;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
max-width: 400px;
}
.note-title {
font-weight: bold;
font-size: 18px;
margin-bottom: 10px;
color: #2c5364;
}
.note-desc {
font-size: 14px;
margin-bottom: 10px;
}
.menu-list {
list-style: none;
padding: 0;
margin: 0;
}
.menu-list li {
margin-bottom: 8px;
}
.menu-list a {
text-decoration: none;
color: #2c5364;
font-weight: 600;
transition: 0.3s;
}
.menu-list a:hover {
color: #4CAF50;
padding-left: 5px;
}
.app-footer {

  background: #0a0f2e;

  color: #ccc;

  padding: 30px 20px;

  margin-top: 50px;

  border-top: none;

  font-family: Arial, sans-serif;

}

.footer-container {

  max-width: 1200px;

  margin: auto;

}

.footer-top {

  margin-bottom: 15px;

}

.footer-brand {

  font-size: 15px;

}

.footer-brand a {

  color: #4CAF50;

  text-decoration: none;

  font-weight: bold;

}

.footer-brand a:hover {

  text-decoration: underline;

}

.footer-highlight {

  display: block;

  font-size: 18px;

  font-weight: 700;

  color: #ffffff;

  margin-top: 5px;

}

.footer-bottom {

  font-size: 13px;

  line-height: 1.6;

  color: #aaa;

}