/* --- Modern Student Portal CSS - Blue, Gold, Black Theme --- */
:root {
  --primary-blue: #1e3a8a;
  --primary-blue-light: #3b82f6;
  --primary-blue-dark: #1e40af;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #d97706;
  --black: #111827;
  --black-light: #374151;
  --black-dark: #000000;
  --white: #ffffff;
  --gray-light: #f3f4f6;
  --gray: #9ca3af;
  --gray-dark: #6b7280;
  
  --primary-gradient: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  --gold-gradient: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  --hero-gradient: linear-gradient(135deg, var(--black) 0%, var(--primary-blue) 50%, var(--gold) 100%);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
  --shadow-gold: 0 4px 15px rgba(245, 158, 11, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

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

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === NAVIGATION === */
.navbar {
  background: var(--primary-gradient);
  backdrop-filter: blur(10px);
  position: fixed;
    top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  border-bottom: 3px solid var(--gold);
}

.navbar .container {
    display: flex;
    align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  min-height: 80px;
}

.logo {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--white);
    text-decoration: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
  list-style: none;
    align-items: center;
}

.nav-links a, .nav-btn {
  color: var(--white);
    text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
    transition: var(--transition);
  position: relative;
  font-size: 1.1rem;
  background: none;
  border: none;
    cursor: pointer;
}

.nav-links a:hover, .nav-links a.active, .nav-btn:hover {
  background: var(--gold-gradient);
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-links a:hover::before, .nav-links a.active::before {
  width: 80%;
}

/* === HERO SECTION === */
.hero {
  background: var(--hero-gradient);
  color: var(--white);
    text-align: center;
  padding: 120px 0 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

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

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.hero p {
  font-size: 1.4rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
}

.hero-accent {
  color: var(--gold);
  font-weight: 700;
}

/* === FEATURES SECTION === */
.features {
  padding: 80px 0;
  background: var(--gray-light);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--gray-light);
  transform: skewY(-2deg);
}

.features .container {
    display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gold-gradient);
}

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

.feature-card h2 {
  color: var(--primary-blue);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  position: relative;
}

.feature-card h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

.feature-card p {
  color: var(--black-light);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

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

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

.btn-secondary {
  background: var(--gold-gradient);
  color: var(--black);
  box-shadow: var(--shadow-gold);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

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

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

/* === FORMS === */
form {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--gray-light);
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-blue);
  font-size: 1.1rem;
}

form input, form select, form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--gray);
  border-radius: var(--radius-md);
  font-size: 1rem;
    transition: var(--transition);
  background: var(--white);
  color: var(--black);
}

form input:focus, form select:focus, form textarea:focus {
    outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

form button[type="submit"] {
  width: 100%;
  margin-top: 1.5rem;
}

/* === CARDS AND LISTS === */
.data-list, #courseList, #resultList {
  background: none;
  padding: 0;
  margin: 0;
}

.data-list > div, #courseList > .course-item, #resultList > .result-item, .list-item, .admin-list-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: var(--transition);
  border: 2px solid transparent;
}

.data-list > div:hover, #courseList > .course-item:hover, #resultList > .result-item:hover, .list-item:hover, .admin-list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
}

.admin-list-item > span, .list-item > div:first-child {
  flex: 1;
  font-size: 1.1rem;
  color: var(--primary-blue);
  font-weight: 600;
  line-height: 1.6;
}

.admin-action-buttons, .action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* === ADMIN DASHBOARD FORM CONTROLS === */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary-blue);
}

.form-section select,
.form-section input[type="number"],
.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="password"] {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid var(--gray-dark);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--black);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.form-section select:focus,
.form-section input[type="number"]:focus,
.form-section input[type="text"]:focus,
.form-section input[type="email"]:focus,
.form-section input[type="password"]:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
  transform: translateY(-2px);
  background: var(--white);
}

.form-section select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231a237e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 3rem;
  appearance: none;
}

.form-section select:hover {
  border-color: var(--primary-blue);
  background-color: var(--gray-light);
}

.form-section input[type="number"] {
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-weight: 600;
}

.form-section input[type="number"]::-webkit-inner-spin-button,
.form-section input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 1.5em;
  margin-right: 0.5rem;
  background: var(--primary-blue);
  border-radius: var(--radius-sm);
}

/* Specific styling for course and student selects */
#courseSelect,
#studentSelect {
  background-color: var(--white);
  border-color: var(--primary-blue);
  font-weight: 600;
  color: var(--primary-blue);
}

#courseSelect:focus,
#studentSelect:focus {
  background-color: var(--white);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

#courseSelect:hover,
#studentSelect:hover {
  background-color: var(--gray-light);
  border-color: var(--gold);
}

/* Marks input specific styling */
#marks {
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
  border-color: var(--gold);
  font-weight: 700;
  text-align: center;
  font-size: 1.2rem;
  color: var(--black);
  letter-spacing: 1px;
}

#marks:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  background: var(--white);
  transform: translateY(-3px);
}

#marks::placeholder {
  color: var(--gray-dark);
  opacity: 0.7;
  font-weight: 400;
  font-size: 1rem;
}

/* Form section layout improvements */
.form-section .btn {
  margin-top: 1rem;
  align-self: flex-start;
  min-width: 150px;
}

/* Responsive adjustments for form controls */
@media (max-width: 768px) {
  .form-section {
    gap: 1rem;
    padding: 1rem;
  }
  
  .form-section select,
  .form-section input[type="number"],
  .form-section input[type="text"],
  .form-section input[type="email"],
  .form-section input[type="password"] {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }
  
  #marks {
    font-size: 1.1rem;
  }
  
  .form-section .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* === MODALS === */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  margin: 2rem;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
    position: relative;
  border: 3px solid var(--gold);
}

/* Large modal for results table */
.modal-content.large-modal {
  max-width: 95%;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem;
}

.modal-content.large-modal .table-container {
  margin: 1rem 0;
  overflow-x: auto;
  max-width: 100%;
}

.modal-content.large-modal .results-table {
  min-width: 800px;
  width: 100%;
}

.modal-content.large-modal .search-bar {
  margin-bottom: 1.5rem;
}

.modal-content.large-modal .modal-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.close-button {
    position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
    cursor: pointer;
  color: var(--gray-dark);
  transition: var(--transition);
}

.close-button:hover {
  color: var(--primary-blue);
  transform: scale(1.1);
}

/* === TABLES === */
.table-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 2rem 0;
  overflow-x: auto;
  max-width: 100%;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
  background: var(--white);
  min-width: 800px;
}

.results-table th, .results-table td {
  padding: 1rem 1.5rem;
    text-align: left;
  border-bottom: 1px solid var(--gray-light);
  white-space: nowrap;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3),
.results-table th:nth-child(4),
.results-table td:nth-child(4) {
  min-width: 120px;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  min-width: 100px;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5),
.results-table th:nth-child(6),
.results-table td:nth-child(6) {
  min-width: 80px;
  text-align: center;
}

.results-table th {
  background: var(--primary-gradient);
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
}

.results-table tr:hover {
  background: var(--gray-light);
}

/* === FOOTER === */
.footer {
  background: var(--black);
  color: var(--white);
    text-align: center;
  padding: 3rem 0;
    margin-top: 4rem;
  border-top: 3px solid var(--gold);
    }

.footer p {
    font-size: 1.1rem;
  opacity: 0.9;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .features .container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}
}

@media (max-width: 768px) {
  .navbar .container {
    padding: 1rem;
  }
  
  .logo {
    font-size: 2rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a, .nav-btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
  
  .hero {
    padding: 100px 0 60px 0;
}
  
  .hero h1 {
    font-size: 2.5rem;
}
  
  .hero p {
    font-size: 1.2rem;
}

.feature-card {
    padding: 2rem 1.5rem;
}

  .feature-card h2 {
    font-size: 1.75rem;
}

  .admin-list-item, .list-item {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .admin-action-buttons, .action-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
}

  .hero p {
    font-size: 1.1rem;
  }
  
.feature-card {
    padding: 1.5rem 1rem;
}

.feature-card h2 {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .modal-content.large-modal {
    max-width: 98%;
    width: 98%;
    max-height: 95vh;
    padding: 1rem;
  }
  
  .modal-content.large-modal .results-table {
    min-width: 600px;
    font-size: 0.9rem;
  }
  
  .modal-content.large-modal .results-table th,
  .modal-content.large-modal .results-table td {
    padding: 0.75rem 1rem;
  }
  
  .modal-content.large-modal .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .modal-content.large-modal .modal-actions .btn {
    width: 100%;
  }
}

/* === SPECIAL ELEMENTS === */
.cgpa-display {
  background: var(--gold-gradient);
  color: var(--black);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 2rem 0;
  box-shadow: var(--shadow-gold);
}

.cgpa-display h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cgpa-display span {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-blue);
}

.search-bar {
  position: relative;
  margin-bottom: 2rem;
  }

.search-bar input[type="text"] {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  border: 2px solid var(--gray);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--white);
}

.search-bar::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--gray-dark);
}

/* === DASHBOARD SPECIFIC === */
.dashboard-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.student-block, .admin-block {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.student-block:hover, .admin-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
}

.student-block h2, .admin-block h2 {
  color: var(--primary-blue);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.student-block p, .admin-block p {
  color: var(--black-light);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

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

.feature-card {
  animation: fadeInUp 0.6s ease-out;
}

.feature-card:nth-child(2) {
  animation-delay: 0.1s;
  }

.feature-card:nth-child(3) {
  animation-delay: 0.2s;
}