:root {
  --primary: #8e44ad;
  --primary-light: #9b59b6;
  --secondary: #2c3e50;
  --accent: #e74c3c;
  --bg: #f8f9fa;
  --card-bg: rgba(255, 255, 255, 0.8);
  --text: #333;
  --text-light: #777;
  --success: #27ae60;
  --warning: #f1c40f;
  --border-radius: 12px;
  --box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.user-progress {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.trix-alert {
  background: linear-gradient(135deg, #ffdede 0%, #ffc5c5 100%);
  border: 3px solid #c0392b;
  color: #c0392b;
  padding: 1rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
}

.trix-alert a {
  color: #c0392b;
  font-weight: 700;
  text-decoration: underline;
}

.trix-alert a:hover {
  color: #a93226;
}

body {
  font-family: "Outfit", "Inter", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

main {
  flex: 1;
}

/* Nav */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 2rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-img {
  height: 20px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  text-decoration: none;
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--primary);
}

.highlight-nav {
  color: var(--primary);
  background: white;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(142, 68, 173, 0.1);
}

.highlight-nav:hover {
  background: var(--primary);
  color: white !important;
  transform: translateY(-1px);
}

.logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  padding: 0;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* Footer */
.main-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-light);
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Flash */
.flash {
  padding: 0.75rem 1.5rem;
  margin: 1rem auto;
  max-width: 1100px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

.flash-notice {
  background: #d4edda;
  color: #155724;
}

.flash-alert {
  background: #f8d7da;
  color: #721c24;
}

/* Existing Buttons and Tables... */
.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.button.primary {
  background: var(--primary);
  color: white;
}

.button.secondary {
  background: var(--secondary);
  color: white;
}

.button.large {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  background: var(--primary);
  color: white;
}

.button.block {
  width: 100%;
  display: block;
  background: var(--primary);
  color: white;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sponsor-highlight {
  box-shadow: inset 0 -8px 0 rgba(142, 68, 173, 0.2);
  font-weight: 700;
}

.progress-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
}

/* Footer Links */
.footer-link {
  color: var(--primary) !important;
  text-decoration: none;
  font-weight: 700;
}

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

/* Submission Details */
.submission-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 1rem;
}

.tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.format {
  background: #e8f4fd;
  color: #007bff;
}

.company {
  background: #eee;
  color: #333;
}

.meta-tags {
  margin-top: 1rem;
}

.submission-content h3 {
  margin-top: 2rem;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Evaluation Section */
.voting-section {
  background: rgba(142, 68, 173, 0.03);
}

.voting-section h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.form-control,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: white;
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

/* Sponsorship Toggle */
.sponsorship-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin: 1.5rem 0;
  cursor: pointer;
  transition: background 0.2s;
  width: fit-content;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--secondary);
}

.sponsorship-toggle-container:hover {
  background: #fcfaff;
}

.sponsorship-toggle-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}

/* Gemini Insight */
.gemini-insight {
  background: linear-gradient(
    135deg,
    rgba(142, 68, 173, 0.08) 0%,
    rgba(52, 152, 219, 0.08) 100%
  );
  border: 1px dashed var(--primary-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.gemini-insight::before {
  content: "✨";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.2rem;
  opacity: 0.6;
}

.gemini-insight h3 {
  margin-top: 0 !important;
  color: var(--primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gemini-insight p {
  font-style: italic;
  color: var(--secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Vote Items in Dashboard */
.vote-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.vote-item:last-child {
  border-bottom: none;
}

.vote-content {
  flex: 1;
}

.vote-score {
  display: block;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 0.2rem;
}

.vote-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  text-decoration: none;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.btn-icon.delete:hover {
  background: #fff5f5;
  border-color: #feb2b2;
}

/* Compact Vote Items */
.vote-item.compact {
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.vote-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  overflow: hidden;
}

.score-badge {
  background: var(--primary);
  color: white;
  font-weight: bold;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 20px;
  text-align: center;
}

.vote-link {
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-meta {
  color: var(--text-light);
  font-size: 0.8rem;
  white-space: nowrap;
}

.vote-actions.miniature {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.vote-actions.miniature a,
.btn-text {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.vote-actions.miniature a:hover,
.btn-text:hover {
  opacity: 1;
}

.vote-actions form {
  margin: 0;
}

/* Sortable Headers */
th a {
  color: var(--secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

th a.current {
  color: var(--primary);
  font-weight: 800;
}

th a.asc::after {
  content: "▲";
  font-size: 0.8em;
}

th a.desc::after {
  content: "▼";
  font-size: 0.8em;
}

/* Search Form */
.search-form {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
}

.search-form input[type="text"] {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.3s;
}

.search-form input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

.search-form input[type="submit"] {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

/* Status Indicators */
.status-accepted {
  background-color: rgba(39, 174, 96, 0.1) !important;
  border-left: 4px solid #27ae60;
}

.status-rejected {
  background-color: rgba(231, 76, 60, 0.1) !important;
  border-left: 4px solid #e74c3c;
}

.status-waitlist {
  background-color: rgba(241, 196, 15, 0.1) !important;
  border-left: 4px solid #f1c40f;
}

/* Anonymize Button */
#anonymize-btn {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 10px;
}

#anonymize-btn:hover {
  opacity: 0.9;
}

#anonymize-btn.active {
  background-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
