:root {
  --bg-gradient: linear-gradient(135deg, #1c261d 0%, #0a110a 100%);
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(229, 235, 162, 0.1);
  --text-primary: #f0fdf4;
  --text-secondary: #aab8a6;
  --accent-color: #6d8751;
  --success-color: #e5eba2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 0;
}

.container {
  padding: 2rem;
  perspective: 1000px;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.avocast-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  background: rgba(229, 235, 162, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(229, 235, 162, 0.2);
}

.dot {
  width: 8px;
  height: 8px;
  background-color: var(--success-color);
  border-radius: 50%;
  margin-right: 0.5rem;
  box-shadow: 0 0 10px var(--success-color);
  animation: pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.status-text {
  color: var(--success-color);
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.auth-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  width: 100%;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-group input:focus {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(109, 135, 81, 0.2);
}

.auth-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.logout-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
  padding: 1.5rem;
  z-index: 1000;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

.cookie-content p {
  margin: 0;
  font-size: 0.95rem;
  text-align: left;
}

.cookie-btn {
  white-space: nowrap;
  width: auto;
  padding: 0.5rem 1.5rem;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .cookie-content p {
    text-align: center;
  }
  .cookie-btn {
    width: 100%;
  }
}

/* Survey UI */
.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.create-survey-card, .survey-list-container {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  text-align: left;
}

@media (min-width: 768px) {
  .glass-card {
    max-width: 900px;
  }

  #loginSection .auth-form {
    max-width: 400px;
    margin: 1.5rem auto 0;
  }

  .dashboard-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .create-survey-card {
    flex: 1;
  }

  .survey-list-container {
    flex: 1.5;
  }
}

.create-survey-card h3, .survey-list-container h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--success-color);
}

.survey-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

.survey-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.survey-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.survey-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.survey-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.survey-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1rem 0.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  gap: 0.25rem;
}

.scale-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.scale-icon {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
}

.scale-item:hover .scale-icon {
  transform: scale(1.15);
}

.scale-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

/* Colors for each level */
.scale-item:nth-child(1) .scale-icon svg { stroke: #ef4444; } /* Red */
.scale-item:nth-child(2) .scale-icon svg { stroke: #f97316; } /* Orange */
.scale-item:nth-child(3) .scale-icon svg { stroke: #eab308; } /* Yellow */
.scale-item:nth-child(4) .scale-icon svg { stroke: #84cc16; } /* Light Green */
.scale-item:nth-child(5) .scale-icon svg { stroke: #22c55e; } /* Green */

.scale-label {
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--text-secondary);
  word-break: break-word;
}

.survey-item-header h4 {
  margin-bottom: 0;
}

.edit-btn {
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s ease;
}

.edit-btn:hover {
  background: var(--accent-color);
  color: #fff;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-card {
  width: 100%;
  max-width: 450px;
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Print Preview Styling */
.survey-preview-box {
  background: #ffffff;
  color: #000000;
  padding: 2rem;
  border-radius: 12px;
  max-height: 50vh;
  overflow-y: auto;
  text-align: center;
}

.print-survey {
  font-family: 'Outfit', sans-serif;
  padding: 2rem;
}

.logo-placeholder {
  display: inline-block;
  border: 2px dashed #cccccc;
  padding: 2rem 4rem;
  color: #888888;
  font-weight: bold;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.print-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.print-question {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  font-weight: 500;
}

.print-scale {
  background: transparent !important;
}

.print-scale .scale-label {
  color: #000000;
  font-size: 1rem;
  font-weight: 500;
}

#printArea {
  display: none;
}

/* Print Media Query */
@media print {
  body * {
    visibility: hidden;
  }
  
  body {
    background: #ffffff !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  #printArea, #printArea * {
    visibility: visible;
  }
  
  #printArea {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: #000000 !important;
    text-align: center;
  }

  .print-scale svg {
    width: 64px !important;
    height: 64px !important;
  }
  
  .print-scale {
    gap: 1rem;
    padding-top: 2rem;
  }

  .print-title {
    font-size: 3rem;
  }

  .print-question {
    font-size: 2rem;
  }
}
