body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: #f4f4f9;
  color: #333;
}

h2, h3 {
  color: #2c3e50;
}

.container {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 100px;
  margin-bottom: 100px;
}

p {
  font-size: 1.1em;
}

textarea {
  width: 100%;
  padding: 10px;
  font-family: monospace;
  font-size: 1em;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: vertical;
  box-sizing: border-box;
}

button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 10px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #2980b9;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
}

th, td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

th {
  background-color: #f0f0f0;
  font-weight: bold;
}

hr {
  margin: 30px 0;
  border: none;
  height: 1px;
  background: #ddd;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.85em;
  font-weight: 600;
  border-radius: 12px;
  color: white;
  text-transform: uppercase;
}

.badge-AC {
  background-color: #28a745; /* Green for AC */
}

.badge-WA {
  background-color: #dc3545; /* Red for WA */
}

.badge-TLE {
  background-color: #fd7e14; /* Orange for TLE */
}

.badge-OLE {
  background-color: #007bff; /* Blue for Compile Error */
}

.badge-PD {
  background-color: #6c757d; /* Bootstrap's secondary gray */
}

.badge-CE {
  background-color: #6f42c1; /* Purple for Syntax Error */
}

.submitting-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #007bff;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  font-weight: bold;
  font-size: 0.95em;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.error-box {
  position: fixed;
  bottom: 80px; /* Higher than submitting box so they don't overlap */
  right: 20px;
  background-color: #dc3545; /* Bootstrap red */
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  font-weight: bold;
  font-size: 0.95em;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.success-box {
  position: fixed;
  bottom: 80px; /* Same level as error box */
  right: 20px;
  background-color: #28a745; /* Bootstrap green */
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  font-weight: bold;
  font-size: 0.95em;
  z-index: 1001; /* On top of error box if both visible */
  transition: opacity 0.3s ease;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

.visible {
  opacity: 1;
  pointer-events: auto;
}

.sample-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: monospace;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.sample-table thead {
  background-color: #f0f0f0;
}

.sample-table th, .sample-table td {
  padding: 12px;
  border: 1px solid #ddd;
  vertical-align: top;
  text-align: left;
}

.sample-table pre {
  margin: 0;
  white-space: pre-wrap; /* wrap long input/output nicely */
  word-wrap: break-word;
}

.ranking-button-container {
  text-align: right;
}

.ranking-button {
  background-color: #6c757d;
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.95em;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.ranking-button:hover {
  background-color: #5a6268;
}
