/**
 * style.css
 * Custom styles for DISC Personality Test
 * Uses Tailwind CSS as base with custom components
 */

/* ============================================================================
   RESET & BASE
   ============================================================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #F8F9FA;
  min-height: 100vh;
  padding: 20px;
  color: #000000;
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */

.app-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #E5E7EB;
  padding: 40px;
  position: relative;
}

/* Top Bar with Logo and Language Switcher */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #F3F4F6;
}

.logo-container {
  display: flex;
  align-items: center;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop: Icon visible by default, text hidden */
.logo-icon {
  width: 60px;
  height: auto;
  opacity: 1;

  transition: transform 0.3s ease;
}

.logo-text {
  height: 45px;
  width: auto;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* Desktop hover: Hide icon, show ONLY text */
.logo-link:hover .logo-icon {
  opacity: 1;
  transform: scale(1.05);
}

.logo-link:hover .logo-text {
  opacity: 1;    
  transform: translateX(0);
  pointer-events: auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .floating-logo {
      top: 1rem;
      left: 1rem;
  }

  .logo-icon {
      width: 48px;
  }

  .logo-text {
      height: 36px;
      opacity: 1;
      transform: translateX( Discontinue with all pause or missing tasks.0px);
  }
}


/* ============================================================================
   HEADER
   ============================================================================ */

.app-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #e5e7eb;
}

.app-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
}

.app-subtitle {
  font-size: 1.1rem;
  color: #6b7280;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 8px;
}

/* Desktop: Show buttons, hide dropdown */
.lang-buttons {
  display: flex;
  gap: 8px;
}

.lang-dropdown {
  display: none;
}

.lang-btn {
  padding: 8px 16px;
  background: white;
  border: 2px solid #000000;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #000000;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: white;
  color: #FF0303;
  border-color: #FF0303;
}

.lang-btn:active {
  background: white;
  color: #000000;
  border-color: #FECC02;
}

.lang-btn.active {
  background: #000000;
  color: white;
  border-color: #000000;
}

/* ============================================================================
   INTRODUCTION & METHODOLOGY
   ============================================================================ */

/* Introduction Card */
.disc-intro-card {
  max-width: 700px;
  margin: 0 auto 40px;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

/* Background image layer with filters */
.disc-intro-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Mobile-first: use mobile image */
  background: url('../images/disc-personalities-mobile.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(1.1) blur(2px);
  z-index: 0;

  /* Modern browsers with WebP support */
  background-image: -webkit-image-set(
    url('../images/disc-personalities-mobile.webp') 1x
  );
  background-image: image-set(
    url('../images/disc-personalities-mobile.webp') 1x
  );
}

/* Desktop: use full-size image */
@media (min-width: 768px) {
  .disc-intro-card::before {
    background-image: url('../images/disc-personalities.png');
    background-image: -webkit-image-set(
      url('../images/disc-personalities.webp') 1x
    );
    background-image: image-set(
      url('../images/disc-personalities.webp') 1x
    );
  }
}

/* Modern browsers with AVIF support (best compression) */
@supports (background-image: image-set(url('../images/disc-personalities-mobile.avif') type("image/avif"))) {
  .disc-intro-card::before {
    background-image: image-set(
      url('../images/disc-personalities-mobile.avif') type("image/avif")
    );
  }

  @media (min-width: 768px) {
    .disc-intro-card::before {
      background-image: image-set(
        url('../images/disc-personalities.avif') type("image/avif")
      );
    }
  }
}

/* Ensure all content is above background */
.disc-intro-card > * {
  position: relative;
  z-index: 2;
}

.disc-intro-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.disc-intro-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 15px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 2;
}

.disc-intro-subtitle {
  font-size: 1.05rem;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 2;
}

/* Why Section - Glassmorphism */
.intro-why-section {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.intro-why-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #FF0303;
  margin-bottom: 20px;
  text-align: center;
}

.intro-reasons-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.intro-reason {
  padding: 12px 0 12px 40px;
  position: relative;
  color: #374151;
  line-height: 1.6;
  font-size: 1rem;
}

.intro-reason::before {
  content: "✓";
  position: absolute;
  left: 10px;
  color: #22C55E;
  font-weight: bold;
  font-size: 1.2rem;
}

.intro-conclusion {
  text-align: center;
  font-weight: 600;
  color: #1f2937;
  font-size: 1.05rem;
  padding-top: 15px;
  border-top: 2px solid #FECC02;
  margin-top: 10px;
}

/* Features */
.disc-features {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 25px;
  position: relative;
  z-index: 2;
}

.disc-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-width: 140px;
}

.disc-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

.disc-feature-icon {
  font-size: 2rem;
}

.disc-feature span:last-child {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

/* Methodology Section */
.methodology-section {
  max-width: 700px;
  margin: 0 auto 40px;
  border-radius: 16px;
  padding: 40px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

/* Background image layer for methodology */
.methodology-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Mobile-first: use mobile image */
  background: url('../images/disc-personalities-mobile.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(1.1) blur(2px);
  z-index: 0;

  /* Modern browsers with WebP support */
  background-image: -webkit-image-set(
    url('../images/disc-personalities-mobile.webp') 1x
  );
  background-image: image-set(
    url('../images/disc-personalities-mobile.webp') 1x
  );
}

/* Desktop: use full-size image */
@media (min-width: 768px) {
  .methodology-section::before {
    background-image: url('../images/disc-personalities.png');
    background-image: -webkit-image-set(
      url('../images/disc-personalities.webp') 1x
    );
    background-image: image-set(
      url('../images/disc-personalities.webp') 1x
    );
  }
}

/* Modern browsers with AVIF support (best compression) */
@supports (background-image: image-set(url('../images/disc-personalities-mobile.avif') type("image/avif"))) {
  .methodology-section::before {
    background-image: image-set(
      url('../images/disc-personalities-mobile.avif') type("image/avif")
    );
  }

  @media (min-width: 768px) {
    .methodology-section::before {
      background-image: image-set(
        url('../images/disc-personalities.avif') type("image/avif")
      );
    }
  }
}

/* Ensure all content is above background */
.methodology-section > * {
  position: relative;
  z-index: 2;
}

.methodology-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
}

.methodology-title::before {
  content: "🔬";
  font-size: 1.5rem;
}

.methodology-content {
  color: #4b5563;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.methodology-text {
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #374151;
}

.methodology-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.methodology-item {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.95rem;
}

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

.methodology-cta {
  text-align: center;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #e5e7eb;
}

.methodology-item strong {
  display: inline-block;
  min-width: 110px;
  font-size: 1rem;
}

/* Type-specific text colors */
.type-d-text {
  color: #FF0303;
}

.type-i-text {
  color: #FECC02;
}

.type-s-text {
  color: #22C55E;
}

.type-c-text {
  color: #374151;
}

/* ============================================================================
   PROFILE FORM
   ============================================================================ */

.profile-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  text-align: center;
}

.form-subtitle {
  font-size: 1rem;
  color: #6b7280;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #FF0303;
  box-shadow: 0 0 0 3px rgba(255, 3, 3, 0.15);
}

.form-input.error {
  border-color: #FF0303;
}

.form-input.error:focus {
  border-color: #cc0202;
  box-shadow: 0 0 0 3px rgba(255, 3, 3, 0.1);
}

/* Error messages */
.error-message {
  color: #FF0303;
  font-size: 0.85rem;
  margin-top: 6px;
  min-height: 20px;
  display: block;
  font-weight: 500;
}

/* Radio buttons for gender */
.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.radio-label:hover {
  border-color: #FF0303;
  background: #FFF0F0;
}

.radio-label input[type="radio"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
  color: #FECC02;
  font-weight: 600;
}

/* Buttons */
.btn {
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-align: center;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.btn-primary {
  background: white;
  color: #000000;
  border: 2px solid #000000;
  width: 100%;
  font-weight: 600;
}

.btn-primary:hover {
  background: white;
  color: #FF0303;
  border-color: #FF0303;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 3, 3, 0.3);
}

.btn-primary:active {
  background: white;
  color: #000000;
  border-color: #FECC02;
}

.btn-primary:disabled {
  background: #f5f5f5;
  color: #999999;
  border-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn-primary:disabled:hover {
  background: #f5f5f5;
  color: #999999;
  border-color: #cccccc;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: white;
  color: #000000;
  border: 2px solid #000000;
}

/* ============================================================================
   INTRO MODE BUTTONS (Quick & Thorough Test Selection)
   ============================================================================ */

.intro-mode-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  background: white;
  border: 3px solid #000000;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.intro-mode-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: #FF0303;
}

.intro-mode-btn:active {
  transform: translateY(-1px);
}

.intro-mode-btn.quick-btn {
  background: linear-gradient(135deg, #FFF9E6 0%, #FECC02 100%);
  border-color: #FECC02;
}

.intro-mode-btn.quick-btn:hover {
  background: linear-gradient(135deg, #FECC02 0%, #FFD700 100%);
  box-shadow: 0 8px 25px rgba(254, 204, 2, 0.3);
}

.intro-mode-btn.thorough-btn {
  background: linear-gradient(135deg, #FFE5E5 0%, #FF0303 100%);
  border-color: #FF0303;
  color: white;
}

.intro-mode-btn.thorough-btn:hover {
  background: linear-gradient(135deg, #FF0303 0%, #CC0202 100%);
  box-shadow: 0 8px 25px rgba(255, 3, 3, 0.3);
}

.intro-mode-btn.thorough-btn div {
  color: white;
}

/* ============================================================================
   ANIMATED ROTATING GRADIENT BORDER BUTTON (KarriereLabor Special)
   ============================================================================ */

.karriere-button {
  position: relative;
  display: inline-block;
  padding: 20px 40px;
  margin: 12px 0;
  background: linear-gradient(145deg, #ffffff 0%, #f5f5f5 100%);
  color: #000000 !important;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 0;
  border: none;
  width: 100%;
}

/* Animated rotating gradient border */
.karriere-button::before {
  content: "";
  position: absolute;
  inset: -250px; /* Extends way beyond button for smooth rotation */
  background: conic-gradient(
    from 0deg,
    #FECC02 0deg 120deg,    /* Gold */
    #FF0303 120deg 240deg,   /* Red */
    #000000 240deg 360deg    /* Black */
  );
  animation: spinBorder 5s linear infinite;
  z-index: -1;
}

/* Inner background layer - creates the border effect */
.karriere-button::after {
  content: "";
  position: absolute;
  inset: 3px; /* 3px gap = border thickness */
  background: linear-gradient(145deg, #ffffff 0%, #f8f8f8 100%);
  border-radius: 8px; /* Slightly smaller radius for inner layer */
  z-index: -1;
}

/* Neumorphic shadow hover effect with colored glow */
.karriere-button:hover {
  transform: translateY(-2px);
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.15),
    -8px -8px 16px rgba(255, 255, 255, 0.7),
    0 0 30px rgba(255, 3, 3, 0.2),   /* Red glow */
    0 0 50px rgba(254, 204, 2, 0.15);   /* Gold glow */
}

/* Active state - pressed effect */
.karriere-button:active {
  transform: translateY(0px);
  box-shadow:
    inset 4px 4px 8px rgba(0, 0, 0, 0.1),
    inset -4px -4px 8px rgba(255, 255, 255, 0.5);
}

/* Disabled state */
.karriere-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.karriere-button:disabled::before {
  animation: none;
}

.karriere-button:disabled:hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Rotation animation */
@keyframes spinBorder {
  to {
    transform: rotate(360deg);
  }
}

.btn-secondary:hover {
  background: white;
  color: #FF0303;
  border-color: #FF0303;
}

.btn-secondary:active {
  background: white;
  color: #000000;
  border-color: #FECC02;
}

.btn-secondary:disabled {
  background: #f5f5f5;
  color: #999999;
  border-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn-secondary:disabled:hover {
  background: #f5f5f5;
  color: #999999;
  border-color: #cccccc;
  transform: none;
  box-shadow: none;
}

/* ============================================================================
   TEST VIEW
   ============================================================================ */

.test-container {
  max-width: 700px;
  margin: 0 auto;
}

/* Progress Container */
.progress-container {
  margin-bottom: 30px;
}

.progress-bar {
  width: 100%;
  height: 40px;
  background: #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: #000000;
  border-radius: 20px;
  transition: width 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0%;
  position: relative;
}

.progress-percentage {
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  animation: progressPulse 0.5s ease;
}

@keyframes progressPulse {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.3);
    color: #FECC02;
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

.question-progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.question-progress-text.pop-animation {
  animation: questionPop 0.6s ease;
}

@keyframes questionPop {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.15);
    color: #FF0303;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.question-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.question-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 25px;
  line-height: 1.5;
}

.drag-instruction {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 20px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
}

.drag-label {
  text-align: center;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}

.drag-label-top {
  margin-bottom: 10px;
}

.drag-label-bottom {
  margin-top: 4px;
  margin-bottom: 25px;
}

/* Answer Items */
.answers-container {
  min-height: 300px;
}

.answer-item {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: move;
  transition: all 0.2s;
  user-select: none;
}

.answer-item:hover {
  border-color: #FF0303;
  box-shadow: 0 4px 12px rgba(255, 3, 3, 0.2);
}

.answer-item.dragging {
  opacity: 0.9;
  transform: rotate(2deg);
  background: #fff;
  border-color: #FECC02;
  box-shadow: 0 8px 20px rgba(254, 204, 2, 0.4);
}

.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: #9ca3af;
}

.drag-icon {
  width: 24px;
  height: 24px;
}

.answer-text {
  flex: 1;
  font-size: 1rem;
  color: #374151;
  line-height: 1.4;
}

/* Quick Mode (Click Selection) Styles */
.answer-item.clickable {
  cursor: pointer;
}

.answer-item.clickable:hover {
  border-color: #000000;
  transform: translateX(2px);
}

.answer-item.selected-most {
  background: #DCFCE7;
  border-color: #22C55E;
  border-width: 3px;
}

.answer-item.selected-least {
  background: #FFE5E5;
  border-color: #FF0303;
  border-width: 3px;
}

.selection-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  flex-shrink: 0;
}

.thumbs-icon {
  width: 28px;
  height: 28px;
}

.selected-most .thumbs-icon {
  color: #22C55E;
}

.selected-least .thumbs-icon {
  color: #FF0303;
}

.test-actions {
  text-align: center;
}

/* ============================================================================
   RESULTS VIEW
   ============================================================================ */

.results-container {
  max-width: 800px;
  margin: 0 auto;
}

.results-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.results-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  text-align: center;
}

.chart-type-selector {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px;
  z-index: 10;
}

.chart-type-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.chart-type-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.chart-type-btn.active {
  background: #000000;
  color: white;
}

.chart-type-btn svg {
  width: 20px;
  height: 20px;
}

.results-subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.chart-container {
  background: #f9fafb;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.chart-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
}

/* Flower Chart */
.flower-chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  min-height: 450px;
}

.flower-chart {
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

.flower-petal {
  transition: all 0.3s ease;
  cursor: pointer;
  transform-origin: center;
}

.flower-petal:hover {
  opacity: 1;
  filter: brightness(1.15);
  transform: scale(1.1);
}

.petal-score {
  font-weight: 700;
  font-size: 18px;
  fill: white;
  text-anchor: middle;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chart-info {
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
  margin-top: 15px;
  font-style: italic;
}

/* Interpretation Section */
.interpretation-container {
  background: #f9fafb;
  border: 2px solid #000000;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.interpretation-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  text-align: center;
}

.interpretation-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.interpretation-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 24px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-width: 180px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interpretation-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.interpretation-badge.primary {
  border: 2px solid #FF0303;
}

.interpretation-badge.secondary {
  border: 2px solid #9ca3af;
}

/* Type-specific badge colors */
.interpretation-badge.type-D {
  border-color: #FF0303 !important;
}

.interpretation-badge.type-I {
  border-color: #FECC02 !important;
}

.interpretation-badge.type-S {
  border-color: #22C55E !important;
}

.interpretation-badge.type-C {
  border-color: #374151 !important;
}

.badge-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 4px;
}

.badge-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.interpretation-badge.primary .badge-value {
  color: #FF0303;
}

/* Type-specific badge value colors */
.interpretation-badge.type-D .badge-value {
  color: #FF0303;
}

.interpretation-badge.type-I .badge-value {
  color: #FECC02;
}

.interpretation-badge.type-S .badge-value {
  color: #22C55E;
}

.interpretation-badge.type-C .badge-value {
  color: #374151;
}

.interpretation-text {
  color: #374151;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

.interpretation-text p{
  white-space: pre-line;  
  margin: 1em 0;
  text-align: left;
}

/* Type Descriptions */
.type-descriptions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.type-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.type-card.type-D { border-left-color: #FF0303; }
.type-card.type-I { border-left-color: #FECC02; }
.type-card.type-S { border-left-color: #22c55e; }
.type-card.type-C { border-left-color: #374151; }

.type-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.type-card.type-D .type-card-title { color: #FF0303; }
.type-card.type-I .type-card-title { color: #FECC02; }
.type-card.type-S .type-card-title { color: #22c55e; }
.type-card.type-C .type-card-title { color: #374151; }

.type-card-score {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
}

.type-card-desc {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Stats */
.stats-container {
  background: #f9fafb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #000000;
}

.stat-label {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Actions */
.results-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.results-actions .btn {
  flex: 1;
  min-width: 200px;
  max-width: 250px;
}

/* ============================================================================
   DETAILS VIEW
   ============================================================================ */

.details-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

/* Pastel background colors for each type */
.details-type-D {
  background-color: #FFE5E5; /* Pastel red */
}

.details-type-I {
  background-color: #FFF9E6; /* Pastel gold */
}

.details-type-S {
  background-color: #E6F9E6; /* Pastel green */
}

.details-type-C {
  background-color: #E6E9EC; /* Pastel gray */
}

.details-header {
  margin-bottom: 30px;
}

.details-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.back-button {
  background: #f3f4f6;
  color: #374151;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.back-button:hover {
  background: #e5e7eb;
}

.details-content {
  background: #f9fafb;
  border-radius: 12px;
  padding: 30px;
  max-height: 600px;
  overflow-y: auto;
}

.detail-question {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-question-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 15px;
  line-height: 1.4;
}

.detail-rankings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-ranking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid;
}

.ranking-position {
  font-weight: 700;
  color: #6b7280;
  font-size: 0.85rem;
  min-width: 120px;
}

.ranking-text {
  flex: 1;
  color: #374151;
  font-size: 0.95rem;
}

.no-data {
  text-align: center;
  color: #9ca3af;
  padding: 40px;
  font-style: italic;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .app-container {
    padding: 12px;
  }

  .app-title {
    font-size: 1.5rem;
  }

  .results-title {
    font-size: 1.6rem;
  }

  .results-header {
    gap: 12px;
  }

  /* Make flower chart larger on mobile with less white space */
  .flower-chart-container {
    min-height: 380px;
    padding: 5px;
  }

  #flowerChart {
    min-height: 380px;
  }

  /* Reduce margins for more space */
  .results-container {
    padding: 0;
  }

  .chart-container {
    padding: 15px;
    margin-top: 0;
    margin-bottom: 15px;
  }

  .interpretation-container {
    padding: 20px 15px;
    margin-bottom: 20px;
  }

  .type-card {
    padding: 15px;
  }

  .form-section {
    padding: 25px 15px;
  }

  .top-bar {
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 15px;
  }

  .logo-container {
    flex: 1;
  }

  /* Mobile: Hide buttons, show compact dropdown in top right */
  .language-switcher {
    position: relative;
    width: auto;
  }

  .lang-buttons {
    display: none;
  }

  .lang-dropdown {
    display: block;
    padding: 6px 10px;
    background: white;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 28px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .lang-dropdown:hover {
    border-color: #9ca3af;
  }

  .lang-dropdown:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  }

  /* Mobile: Show both icon and text, no hover effect */
  .logo-icon,
  .logo-text {
    opacity: 1 !important;
  }

  .logo-icon {
    width: 48px;
  }

  .logo-text {
    height: 36px;
  }

  .type-descriptions {
    grid-template-columns: 1fr;
  }

  .results-actions {
    flex-direction: column;
  }

  .results-actions .btn {
    max-width: 100%;
  }

  .radio-group {
    flex-direction: column;
  }

  /* Introduction Card - Mobile */
  .disc-intro-card {
    padding: 25px 20px;
    margin-bottom: 30px;
  }

  .disc-intro-title {
    font-size: 1.5rem;
  }

  .disc-intro-subtitle {
    font-size: 0.95rem;
  }

  /* Why Section - Mobile */
  .intro-why-section {
    padding: 20px 15px;
    margin: 20px 0;
  }

  .intro-why-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }

  .intro-reason {
    padding: 10px 0 10px 35px;
    font-size: 0.9rem;
  }

  .intro-reason::before {
    font-size: 1rem;
    left: 8px;
  }

  .intro-conclusion {
    font-size: 0.95rem;
    padding-top: 12px;
  }

  /* Features - Mobile */
  .disc-features {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .disc-feature {
    padding: 12px 20px;
  }

  /* Methodology - Mobile */
  .methodology-section {
    padding: 20px 15px;
    margin-bottom: 30px;
  }

  .methodology-title {
    font-size: 1.2rem;
  }

  .methodology-text {
    font-size: 0.9rem;
  }

  .methodology-cta {
    margin-top: 20px;
    padding-top: 20px;
  }
}

/* ============================================================================
   DRAG INSTRUCTION MODAL
   ============================================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInModal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

@keyframes slideInModal {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 30px 30px 20px;
  text-align: center;
  background: linear-gradient(135deg, #FFF9E6 0%, #FFE5E5 100%);
  border-bottom: 3px solid #FECC02;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.modal-title::before {
  content: "👆";
  font-size: 1.8rem;
  animation: pointingFinger 1.5s ease-in-out infinite;
}

@keyframes pointingFinger {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.modal-body {
  padding: 30px;
}

.drag-animation {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px dashed #d1d5db;
}

.drag-demo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.3s ease;
  cursor: move;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.drag-demo-item span {
  font-weight: 600;
  color: #374151;
  font-size: 1rem;
}

.drag-icon-small {
  width: 20px;
  height: 20px;
  color: #9ca3af;
}

/* Animated demonstration */
.drag-demo-1 {
  animation: dragDemo1 3s ease-in-out infinite;
}

.drag-demo-2 {
  animation: dragDemo2 3s ease-in-out infinite;
}

.drag-demo-3 {
  animation: dragDemo3 3s ease-in-out infinite;
}

@keyframes dragDemo1 {
  0%, 30%, 100% {
    transform: translateY(0);
    border-color: #e5e7eb;
  }
  10%, 20% {
    transform: translateY(90px);
    border-color: #FF0303;
    box-shadow: 0 8px 16px rgba(255, 3, 3, 0.3);
  }
}

@keyframes dragDemo2 {
  0%, 100% {
    transform: translateY(0);
    border-color: #e5e7eb;
  }
}

@keyframes dragDemo3 {
  0%, 30%, 100% {
    transform: translateY(0);
    border-color: #e5e7eb;
  }
  10%, 20% {
    transform: translateY(-90px);
    border-color: #FECC02;
    box-shadow: 0 8px 16px rgba(254, 204, 2, 0.3);
  }
}

.drag-arrow {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #FF0303;
  animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(1.2);
  }
}

.modal-text {
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.6;
  text-align: center;
  margin: 0;
}

.modal-footer {
  padding: 20px 30px 30px;
  text-align: center;
}

.modal-btn {
  min-width: 200px;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(135deg, #FF0303 0%, #FECC02 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 3, 3, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 3, 3, 0.4);
}

.modal-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 3, 3, 0.3);
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
  .modal-content {
    max-width: 90%;
    margin: 0 20px;
  }

  .modal-header {
    padding: 20px 20px 15px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 20px;
  }

  .drag-animation {
    padding: 15px;
    margin-bottom: 20px;
  }

  .drag-demo-item {
    padding: 10px 12px;
  }

  .drag-arrow {
    right: -15px;
    font-size: 1.5rem;
  }

  .modal-text {
    font-size: 0.95rem;
  }

  .modal-footer {
    padding: 15px 20px 20px;
  }

  .modal-btn {
    min-width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
  }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

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

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Smooth transitions for view changes */
.view-container {
  animation: fadeIn 0.4s ease-out;
}
