@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.playfair-display-pl {
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

body {
  font-family: 'Playfair Display', serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Header and Navigation */
.header {
  background: #dc3545;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

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

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-links a:hover {
  background-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.nav-links a.active {
  background-color: rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 80px);
  padding: 2rem 0;
}

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

/* Typography */
h1 {
  font-size: 2.5rem;
  color: #dc3545;
  margin-bottom: 1rem;
  text-align: center;
}

h2 {
  font-size: 1.8rem;
  color: #28a745;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
  color: #dc3545;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
  color: #555;
  font-size: 1.1rem;
}

/* Home Page Styles */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 2px solid #e9ecef;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(220, 53, 69, 0.2);
  border-color: #dc3545;
  text-decoration: none;
}

.feature-card:focus-visible {
  outline: 3px solid #28a745;
  outline-offset: 4px;
}

.feature-card .btn {
  pointer-events: none;
}

/* About Page Styles */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  border-left: 4px solid #28a745;
}

.about-section ul {
  margin-left: 2rem;
  margin-top: 1rem;
}

.about-section li {
  margin-bottom: 0.5rem;
  color: #555;
}

/* ASMT 2025 Page Styles */
.event-details {
  max-width: 900px;
  margin: 0 auto;
}

.event-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  border-left: 4px solid #dc3545;
}

.event-section ul {
  margin-left: 2rem;
  margin-top: 1rem;
}

.event-section li {
  margin-bottom: 0.5rem;
  color: #555;
}

/* Archive Page Styles */
.archive-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border: 2px solid #e9ecef;
  margin-top: 2rem;
}

.archive-table-wrapper {
  overflow-x: auto;
}

.archive-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
}

.archive-table tbody td {
  padding: 0.75rem 1rem;
  text-align: left;
}

.archive-table tbody tr + tr {
  border-top: 1px solid #e9ecef;
}

.archive-round {
  font-weight: 700;
  color: #333;
  width: 40%;
}

.archive-entry {
  font-weight: 600;
  color: #dc3545;
}

.archive-placeholder {
  font-weight: 500;
  color: #6c757d;
}

@media (max-width: 600px) {
  .archive-card {
    padding: 1.5rem;
  }

  .archive-table thead th,
  .archive-table tbody td {
    padding: 0.6rem 0.75rem;
  }
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: #dc3545;
  color: white;
}

.btn-primary:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-secondary {
  background: #28a745;
  color: white;
}

.btn-secondary:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Image styling */
img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin: 2rem auto;
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .nav-links a {
    text-align: center;
    padding: 0.8rem 1rem;
  }
  
  .feature-card,
  .about-section,
  .event-section {
    padding: 1.5rem;
  }
}
.signup-link {
  color: #dc3545;
  text-decoration: none;
  font-weight: bold;
}

.signup-link:hover {
  text-decoration: underline;
}

a {
  color: #dc3545;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/* Contact Section Styles */
.contact-section {
  text-align: center;
  margin-top: 2rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Override default link styling for social icons */
.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  min-width: 120px;
  border: 2px solid transparent;
}

.social-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border-color: #dc3545;
  color: #dc3545;
  text-decoration: none;
}

.social-link:visited {
  color: #333;
  text-decoration: none;
}

.social-link:active {
  color: #333;
  text-decoration: none;
}

.social-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.social-link:hover .social-icon {
  transform: scale(1.1);
}

.social-link span {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive adjustments for social links */
@media (max-width: 768px) {
  .social-links {
    gap: 1rem;
  }
  
  .social-link {
    min-width: 100px;
    padding: 1rem;
  }
  
  .social-icon,
  .social-link svg {
    width: 35px !important;
    height: 35px !important;
    max-width: 35px !important;
    max-height: 35px !important;
    min-width: 35px !important;
    min-height: 35px !important;
  }
}

/* SVG specific sizing fixes for production */
.social-link svg {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  flex-shrink: 0;
  color: #333 !important;
  fill: #333 !important;
}

.social-link:hover svg {
  color: #dc3545 !important;
  fill: #dc3545 !important;
}

/* Bug report footer */
.bug-report-footer {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1rem 2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #6c757d;
}

.bug-report-footer-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(0.3);
}

@media (max-width: 600px) {
  .bug-report-footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Red & Green Theme Updates */
.portal-btn {
  background-color: #198754 !important; /* Success Green */
  color: white !important;
}
.portal-btn:hover { background-color: #146c43 !important; }

/* Buttons inside the portal */
.btn-primary { background-color: #dc3545; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-primary:hover { background-color: #bb2d3b; }
.btn-success { background-color: #198754; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-success:hover { background-color: #146c43; }
.btn-disabled { background-color: #6c757d; color: white; cursor: not-allowed; }

/* Status Badges */
.status-locked { background-color: #dc3545; color: white; padding: 3px 8px; border-radius: 12px; font-size: 0.8rem; }
.status-unlocked { background-color: #198754; color: white; padding: 3px 8px; border-radius: 12px; font-size: 0.8rem; }

body { background-color: #f0f2f5; transition: background-color 0.3s, color 0.3s; }
.admin-container { padding: 30px; max-width: 1400px; margin: 0 auto; }
.nav-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid #ddd; padding-bottom: 10px; flex-wrap: wrap; }
.tab-btn { padding: 10px 20px; border: none; background: #ddd; cursor: pointer; font-weight: bold; border-radius: 5px; transition: background-color 0.3s; }
.tab-btn.active { background: #dc3545; color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 20px; transition: background-color 0.3s, box-shadow 0.3s; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.95rem; }
th, td { padding: 10px; border-bottom: 1px solid #eee; text-align: left; vertical-align: middle; transition: border-color 0.3s; }
th { background: #f8f9fa; transition: background-color 0.3s; }

.switch-container { display: flex; justify-content: space-between; align-items: center; padding: 15px; border: 1px solid #ddd; margin-bottom: 10px; border-radius: 5px; transition: background-color 0.3s, border-color 0.3s; }
.btn-danger { background: #dc3545; color: white; padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; }
.btn-success { background: #198754; color: white; padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; }
.btn-info { background: #0dcaf0; color: white; padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; }
.btn-small { padding: 4px 8px; font-size: 0.8rem; border-radius: 4px; border: none; cursor: pointer; color: white; margin-left: 5px; }

.chat-layout { display: flex; height: 450px; border: 1px solid #ddd; border-radius: 5px; overflow: hidden; transition: border-color 0.3s; }
.chat-threads { width: 280px; background: #f8f9fa; border-right: 1px solid #ddd; overflow-y: auto; transition: background-color 0.3s, border-color 0.3s; }
.thread-item { padding: 12px; border-bottom: 1px solid #ddd; cursor: pointer; font-size: 0.9rem; transition: background-color 0.3s, border-color 0.3s; }
.thread-item:hover { background: #e9ecef; }
.chat-active { flex: 1; display: flex; flex-direction: column; background: white; transition: background-color 0.3s; }

.subject-select { padding: 8px 12px; border-radius: 4px; border: 1px solid #ccc; font-weight: bold; background: white; cursor: pointer; transition: background-color 0.3s, color 0.3s; }

.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: #fefefe; margin: 5% auto; padding: 30px; border: 1px solid #888; width: 90%; max-width: 800px; border-radius: 8px; position: relative; }
.close-modal { position: absolute; top: 15px; right: 20px; color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-modal:hover { color: black; }
.audit-table th, .audit-table td { padding: 8px; border: 1px solid #ddd; text-align: center; }

.round-layout { display: flex; height: calc(100vh - 70px); background: #f8f9fa; margin: 0; }
.sidebar { width: 300px; background: white; border-right: 1px solid #ddd; padding: 20px; display: flex; flex-direction: column; overflow-y: auto; }
.round-content { flex: 1; padding: 40px; overflow-y: auto; }
.problem-box { background: white; padding: 20px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 20px; font-size: 1.1rem; color: #333; }
.answer-input { width: 100%; padding: 10px; margin-top: 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 1.1rem; }

body.dark-mode { background-color: #121212; color: #e0e0e0; }
body.dark-mode .card { background-color: #1e1e1e; box-shadow: 0 2px 4px rgba(255,255,255,0.05); }
body.dark-mode table th { background-color: #2c2c2c; color: #e0e0e0; border-bottom: 1px solid #444; }
body.dark-mode table td { border-bottom: 1px solid #333; color: #ccc; }
body.dark-mode .switch-container { border: 1px solid #444; background: #2c2c2c !important; color: #e0e0e0; }
body.dark-mode .tab-btn { background: #333; color: #aaa; }
body.dark-mode .tab-btn.active { background: #dc3545; color: white; }
body.dark-mode .nav-tabs { border-bottom: 2px solid #444; }
body.dark-mode .chat-threads { background: #252525; border-right: 1px solid #444; }
body.dark-mode .thread-item { border-bottom: 1px solid #444; }
body.dark-mode .thread-item:hover { background: #333; }
body.dark-mode .chat-active { background: #1e1e1e; }
body.dark-mode .chat-layout { border-color: #444; }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background: #333; color: #fff; border: 1px solid #555; }
body.dark-mode .card[style*="background-color: #fffdf5"] { background-color: #2a2205 !important; }
body.dark-mode h2[style*="color: #856404"] { color: #f9d865 !important; }
body.dark-mode .modal-content { background-color: #1e1e1e; color: #e0e0e0; border-color: #444; }
body.dark-mode .audit-table th, body.dark-mode .audit-table td { border-color: #444; }
body.dark-mode .problem-box { background-color: #2c2c2c; color: #e0e0e0; border-color: #444; }
body.dark-mode .sidebar { background-color: #1e1e1e; border-color: #444; }
body.dark-mode .round-layout { background-color: #121212; }
body.dark-mode .admin-container { color: #f1f3f5; }
body.dark-mode .admin-container h1,
body.dark-mode .admin-container h2,
body.dark-mode .admin-container h3,
body.dark-mode .admin-container p,
body.dark-mode .admin-container li,
body.dark-mode .admin-container label,
body.dark-mode .admin-container td,
body.dark-mode .admin-container th,
body.dark-mode .admin-container span:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-info) { color: #f1f3f5 !important; }
body.dark-mode .admin-container a { color: #a5d8ff !important; }
body.dark-mode .subject-select { background: #2a2a2a !important; color: #f1f3f5 !important; border-color: #555 !important; }
body.dark-mode .tab-content { color: #f1f3f5; }
body.dark-mode #readiness-results { color: #f1f3f5 !important; }
body.dark-mode .modal-content h2 { color: #ffa8a8 !important; }
body.dark-mode #audit-body p,
body.dark-mode #audit-body li,
body.dark-mode #audit-body td,
body.dark-mode #audit-body th { color: #f1f3f5 !important; }
body.dark-mode #editor-fields strong,
body.dark-mode #editor-fields .problem-box,
body.dark-mode #editor-fields label { color: #f1f3f5 !important; }
body.dark-mode #editor-fields > div { color: #e9ecef !important; }