/* ============================================
   Landing Page Styles (only applies to landing page)
   ============================================ */

body.landing-page-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

body.landing-page-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.landing-page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.landing-page-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Hero Section */
.hero-section {
  color: white;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin: 0 0 3rem 0;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

.feature-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Login Card */
.login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card-header {
  padding: 2.5rem 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.login-subtitle {
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.9;
}

.login-card-body {
  padding: 2.5rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-form .form-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.login-form .form-input,
.login-form input[type="text"],
.login-form input[type="password"] {
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.login-form .form-input:focus,
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-form .form-input::placeholder,
.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
  color: #9ca3af;
}

.btn-login {
  margin-top: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.error-message {
  padding: 1rem 1.25rem;
  background-color: #fee2e2;
  color: #dc2626;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  border: 2px solid #fecaca;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.error-message:empty {
  display: none;
}

/* Responsive Design */
@media (max-width: 968px) {
  .landing-page-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) {
  .landing-page-container {
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .login-card-header,
  .login-card-body {
    padding: 1.5rem;
  }
}

/* ============================================
   Compare Pages Styling
   ============================================ */

/* Make compare page wider */
.landing-page-container.compare-page {
  max-width: 98%;
  padding: 0.5rem;
}

.admin-content-card.compare-page-card {
  padding: 1rem;
  margin: 0.5rem auto;
}

.compare-viewers-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.compare-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.compare-buttons form {
  flex: 1;
  max-width: 300px;
}

.btn-gradient {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  width: 100%;
}

.btn-gradient .btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-gradient .btn-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-gradient:active {
  transform: translateY(0);
}

.compare-viewers-wrapper {
  display: flex;
  gap: 1rem;
  justify-content: center;
  width: 100%;
}

.seadragon-viewer {
  flex: 1;
  min-width: 0;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Legacy IDs for backward compatibility */
#openseadragon,
#openseadragon2,
#viewer1,
#viewer2 {
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
} 

#resultsTitle{
  visibility: hidden;
}

#invisible{
  visibility: hidden;
}

.improved{ 
  color: orange;
}

.good{ 
  color: green;
}

.bad{ 
  color: red;
}

/* Base body styles - applies to all pages */
body {
  font-family: Arial, sans-serif;
}

.likert {
  margin-bottom: 1em;
}
.likert label {
  display: inline-block;
  width: 2em;
  text-align: center;
}
.likert input[type="radio"] {
  display: none;
}
.likert input[type="radio"] + label {
  border: 1px solid #ccc;
  padding: 0.5em;
  cursor: pointer;
}
.likert input[type="radio"]:checked + label {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}
.score {
  margin-top: 1em;
}
.score label {
  display: inline-block;
  width: 6em;
}
.score input[type="number"] {
  width: 4em;
  padding: 0.5em;
  border: 1px solid #ccc;
}

/* ============================================
   Admin Pages Styling (matching landing page)
   ============================================ */

/* Admin page content card */
.admin-content-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 2.5rem;
  margin: 2rem auto;
  max-width: 1400px;
  animation: slideIn 0.6s ease-out;
}

/* Admin navigation styling */
.admin-nav-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.admin-nav-modern .navbar-brand {
  color: white !important;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
}

.admin-nav-modern .navbar-brand:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

.admin-nav-modern .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin: 0 0.25rem;
}

.admin-nav-modern .navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white !important;
}

.admin-nav-modern .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.admin-nav-modern .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Table styling for admin pages */
.admin-content-card .table {
  margin-top: 1.5rem;
}

.admin-content-card .table thead th {
  background: #667eea;
  color: white;
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.admin-content-card .table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

.admin-content-card .table tbody tr:hover {
  background-color: #f9fafb;
}

/* Button styling for admin pages */
.admin-content-card .btn {
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-content-card .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.admin-content-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.admin-content-card .btn-secondary {
  background: #6b7280;
  border: none;
}

.admin-content-card .btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-2px);
}

/* Form styling for admin pages */
.admin-content-card .form-control,
.admin-content-card input[type="text"],
.admin-content-card input[type="password"],
.admin-content-card textarea,
.admin-content-card select {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.admin-content-card .form-control:focus,
.admin-content-card input[type="text"]:focus,
.admin-content-card input[type="password"]:focus,
.admin-content-card textarea:focus,
.admin-content-card select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tab styling */
.admin-content-card .nav-tabs {
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1.5rem;
}

.admin-content-card .nav-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: #6b7280;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-content-card .nav-tabs .nav-link:hover {
  border-bottom-color: #667eea;
  color: #667eea;
}

.admin-content-card .nav-tabs .nav-link.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: transparent;
}

/* Heading styling */
.admin-content-card h2,
.admin-content-card h3,
.admin-content-card h4,
.admin-content-card h5,
.admin-content-card h6 {
  color: #1f2937;
  font-weight: 700;
}

.admin-content-card h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* Pagination styling */
.admin-content-card .pagination {
  margin-top: 2rem;
  display: flex;
  gap: 0.5rem;
}

/* Dashboard card styling */
.dashboard-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 1.5rem;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.dashboard-card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.dashboard-card-title {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-card-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.dashboard-info-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #667eea;
}

.dashboard-info-card h4 {
  color: #1f2937;
  font-weight: 700;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

.dashboard-status-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-status-card h4 {
  color: #1f2937;
  font-weight: 700;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

.status-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.status-success {
  color: #10b981;
  font-weight: 600;
}

.status-warning {
  color: #f59e0b;
  font-weight: 600;
}

/* Responsive adjustments for admin pages */
@media (max-width: 768px) {
  .admin-content-card {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .admin-nav-modern {
    padding: 0.75rem 1rem;
  }
  
  .dashboard-card-value {
    font-size: 2rem;
  }
}

/* ============================================
   Shared Form Card Styles (for login, register, etc.)
   ============================================ */

.form-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideIn 0.6s ease-out;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.form-card-header {
  padding: 2.5rem 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.form-card-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.form-card-subtitle {
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.9;
}

.form-card-body {
  padding: 2.5rem;
}

.form-card .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-card .form-group:last-of-type {
  margin-bottom: 0;
}

.form-card label,
.form-card .form-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.form-card input[type="text"],
.form-card input[type="password"],
.form-card input[type="email"],
.form-card input[type="number"],
.form-card textarea,
.form-card select {
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.form-card input[type="text"]:focus,
.form-card input[type="password"]:focus,
.form-card input[type="email"]:focus,
.form-card input[type="number"]:focus,
.form-card textarea:focus,
.form-card select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-card input[type="text"]::placeholder,
.form-card input[type="password"]::placeholder,
.form-card input[type="email"]::placeholder {
  color: #9ca3af;
}

.form-card input[type="submit"],
.form-card button[type="submit"],
.form-card .btn-submit {
  margin-top: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  width: 100%;
}

.form-card input[type="submit"]:hover,
.form-card button[type="submit"]:hover,
.form-card .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.form-card input[type="submit"]:active,
.form-card button[type="submit"]:active,
.form-card .btn-submit:active {
  transform: translateY(0);
}

/* Single column layout for form cards */
.landing-page-content.form-only {
  grid-template-columns: 1fr;
  justify-items: center;
}

/* Ensure form card is wider on login page */
.landing-page-content.form-only .form-card {
  max-width: 700px !important;
  width: 100% !important;
}

/* Smaller form card for admin pages */
.admin-content-card .form-card {
  max-width: 500px;
  margin: 0;
}

.admin-content-card .form-card-header {
  padding: 1.5rem 1.5rem 1rem;
}

.admin-content-card .form-card-title {
  font-size: 1.5rem;
}

.admin-content-card .form-card-body {
  padding: 1.5rem;
}

/* Smooth transition for collapsible form */
#createGroupForm {
  transition: all 0.3s ease-in-out;
  animation: slideDown 0.3s ease-out;
}

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

@media (max-width: 640px) {
  .form-card-header,
  .form-card-body {
    padding: 1.5rem;
  }
  
  .form-card-title {
    font-size: 1.5rem;
  }
}

/* Error message icon styling */
.error-icon {
  font-size: 1.5rem;
}

/* Comment form container */
.comment-form-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
}

.comment-form-container .seadragon-viewer {
  flex: 1;
  min-width: 0;
}

.comment-form-container .comment-form-wrapper {
  flex: 1;
  min-width: 0;
}

/* Continue button layout on comment page */
.compare-continue {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.compare-continue .btn-gradient {
  display: inline-block;
  width: auto;
  min-width: 200px;
  text-decoration: none;
}

@media (max-width: 768px) {
  .compare-continue {
    justify-content: center;
  }

  .compare-continue .btn-gradient {
    width: 100%;
    min-width: 0;
  }
}

/* Hidden element class */
.hidden-element {
  display: none !important;
}

/* Rating form styling */
.rating-form-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.rating-form-container .poster-image {
  flex: 0 0 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rating-form-container .poster-image img {
  width: 100%;
  height: auto;
  display: block;
}

.rating-form-container .rating-form-wrapper {
  flex: 1;
}

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

.rating-form-container label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.rating-form-container select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.rating-form-container select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}