/* Universal Reset & Modern Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  line-height: 1.5;
  min-height: 100vh;
}

/* Modern Rounded Header Navbar */
.navtop {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  padding: 12px 0;
}

.navtop div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.navtop div h1 {
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.navtop div a {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 20px;
  background: #f8fafc;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.navtop div a:hover {
  color: #2563eb;
  background: #eff6ff;
}

/* Main Container Card */
.content {
  max-width: 680px;
  width: 92%;
  margin: 24px auto;
  background: #ffffff;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.content p {
    font-weight: 700;       /* Makes text bold */
    color: #1e293b;         /* Darker text color for better contrast */
    font-size: 1.05rem;     /* Slightly larger font */
    margin-bottom: 20px;
}
.divider {
  border: none;
  height: 1px;
  background-color: #e2e8f0;
  margin: 20px 0 24px 0;
}

/* Voting Option Cards */
.poll-vote form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.poll-option-card {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 2px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 16px;
  cursor: pointer;
  gap: 16px;
  transition: all 0.2s ease;
}

.poll-option-card:hover {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.poll-option-card input[type="radio"] {
  accent-color: #2563eb;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.poll-option-card span {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e293b;
  word-break: break-word;
}

/* Circular Image Styling for Voting Options & Results */
.option-img {
  width: 80px;
  height: 80px;
  min-width: 80px;
  object-fit: cover;
  border-radius: 50%; /* Makes image perfectly circular */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
/* Buttons & Actions */
.poll-vote form div {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

input[type="submit"], .create-poll {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.35);
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

input[type="submit"]:hover, .create-poll:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.45);
}

.poll-vote a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.poll-vote a:hover {
  color: #2563eb;
}

/* Sleek Candidate Tiles for Results Page */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.candidate-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}

.candidate-tile:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.candidate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.candidate-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.candidate-img {
  width: 60px;
  height: 60px;
  min-width: 60px;
  object-fit: cover;
  border-radius: 50%; /* Makes image perfectly circular */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.candidate-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  word-break: break-word;
}

.candidate-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vote-count {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
}

.percentage-badge {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 20px;
}

.candidate-tile .bar-container {
  background: #e2e8f0;
  height: 12px;
  border-radius: 50px;
  overflow: hidden;
  width: 100%;
}

.candidate-tile .bar {
  background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%);
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Home Index Table Spacing Fix */
.content.home table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-top: 15px;
}

.content.home table thead td {
  padding: 10px 15px;
  font-weight: 700;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.content.home table tbody tr {
  background: #f8fafc;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.content.home table tbody tr:hover {
  background: #f1f5f9;
  transform: scale(1.005);
}

.content.home table td {
  padding: 16px;
  font-size: 0.95rem;
}

.content.home table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.content.home table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.content.home table td.actions a {
  margin-left: 10px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.content.home table td.actions a:hover {
  color: #2563eb;
}

.content.home table td.actions a.trash:hover {
  color: #ef4444;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .content {
    width: 95%;
    margin: 16px auto;
    padding: 18px;
  }

  .option-img {
    width: 70px;
    height: 70px;
    min-width: 70px;
  }

  .poll-option-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .poll-option-card span {
    font-size: 1rem;
  }

  .candidate-name {
    font-size: 1.1rem;
  }

  .candidate-img {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .poll-vote form div {
    flex-direction: column;
    align-items: stretch;
  }

  input[type="submit"] {
    width: 100%;
    padding: 16px;
  }
}