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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(30, 58, 138, 0.2);
  overflow: hidden;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 30px;
  text-align: center;
  color: white;
  position: relative;
}

.help-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 16px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.help-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  font-weight: 400;
  font-style: italic;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  border-radius: 25px;
  margin: 0 auto;
  max-width: 600px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.subtitle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Content Styles */
.content {
  padding: 30px;
}

h3 {
  color: #1e40af;
  margin: 30px 0 20px 0;
  font-size: 1.5rem;
  font-weight: 600;
  position: relative;
  padding-left: 20px;
}

h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 2px;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
  margin: 20px 0;
}

.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.1);
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 800px;
}

th {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 15px 12px;
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
  border: none;
}

th:first-child {
  border-top-left-radius: 15px;
}

th:last-child {
  border-top-right-radius: 15px;
}

td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  transition: background-color 0.3s ease;
}

tr:hover td {
  background-color: #eff6ff;
}

tr:last-child td:first-child {
  border-bottom-left-radius: 15px;
}

tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: #fafbfc;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="number"] {
  max-width: 80px;
}

.score-cell {
  font-weight: 600;
  font-size: 1rem;
  color: #1e40af;
}

.delete-btn {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

/* GPA Summary Styles */
.gpa-summary {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 15px;
  padding: 25px;
  color: white;
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
}

.gpa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.gpa-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.gpa-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
}

.gpa-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 500;
}

.gpa-value {
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  margin-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  padding: 30px;
  align-items: center;
}

.footer-info h4 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.footer-info p {
  margin-bottom: 8px;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  gap: 15px;
}

.footer-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 30px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.9;
}

.text-red {
  color: #ef4444;
}

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

.modal-content {
  background: white;
  margin: 2% auto;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.close:hover {
  opacity: 0.7;
}

.modal-body {
  padding: 30px;
}

.guide-section {
  margin-bottom: 30px;
}

.guide-section h3 {
  color: #1e40af;
  margin-bottom: 15px;
  font-size: 1.3rem;
  padding-left: 0;
}

.guide-section h3::before {
  display: none;
}

.formula-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #3b82f6;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  font-family: 'Courier New', monospace;
}

.grade-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 0.9rem;
}

.grade-table th,
.grade-table td {
  padding: 8px 12px;
  text-align: center;
  border: 1px solid #e5e7eb;
}

.guide-section ul,
.guide-section ol {
  padding-left: 20px;
  margin: 10px 0;
}

.guide-section li {
  margin: 8px 0;
  line-height: 1.6;
}

.about-content {
  display: grid;
  gap: 25px;
}

.about-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
}

.about-item i {
  font-size: 1.5rem;
  color: #3b82f6;
  margin-top: 5px;
}

.about-item h3 {
  margin: 0 0 10px 0;
  color: #1e40af;
  font-size: 1.1rem;
}

.about-item p,
.about-item ul {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.about-item ul {
  padding-left: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    border-radius: 15px;
  }

  .header {
    padding: 20px;
  }

  .help-btn {
    top: 15px;
    right: 15px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  h1 {
    font-size: 2rem;
  }

  .content {
    padding: 20px;
  }

  h3 {
    font-size: 1.3rem;
    margin: 20px 0 15px 0;
  }

  .table-container {
    border-radius: 10px;
    margin: 15px -10px;
  }

  table {
    min-width: 600px;
    font-size: 0.8rem;
  }

  th, td {
    padding: 8px 6px;
  }

  input[type="text"],
  input[type="number"] {
    padding: 8px;
    font-size: 0.8rem;
  }

  input[type="number"] {
    max-width: 60px;
  }

  .add-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 20px;
  }

  .gpa-summary {
    padding: 20px;
    border-radius: 12px;
  }

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

  .gpa-item {
    padding: 15px;
  }

  .gpa-value {
    font-size: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .about-item {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.7rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .content {
    padding: 15px;
  }

  table {
    min-width: 500px;
    font-size: 0.7rem;
  }

  th, td {
    padding: 6px 4px;
  }

  input[type="text"],
  input[type="number"] {
    padding: 6px;
    font-size: 0.75rem;
  }

  .gpa-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gpa-item {
    padding: 12px;
  }

  .delete-btn {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
  .help-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}

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

.container {
  animation: fadeIn 0.6s ease-out;
} 

/* Custom scrollbar for table */
.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}