/* DISC Personality Test - Modern Styles */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-gold: #f59e0b;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
  --transition-fast: 0.15s ease;
  --transition-medium: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* DISC Colors */
  --disc-d: #0070c0;
  --disc-d-light: #90bdd7;
  --disc-i: #ffc000;
  --disc-i-light: #f6dd8a;
  --disc-s: #70ad47;
  --disc-s-light: #bdd5a6;
  --disc-c: #e63946;
  --disc-c-light: #ff9999;
}

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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    #1a1a2e 50%,
    var(--bg-primary) 100%
  );
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-primary);
}

/* Header / Instructions */
.header {
  text-align: center;
  margin-bottom: 30px;
  max-width: 600px;
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.header p,
h4 {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
}

h3,
h4,
h5 {
  margin-top: 0;
  font-weight: 500;
}

/* Main Container */
.container {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 700px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  max-width: 280px;
}

.column-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-align: center;
}

/* Slots */
.slot {
  padding: 16px 20px;
  background: var(--bg-glass);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  min-height: 54px;
  user-select: none;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  position: relative;
  backdrop-filter: blur(10px);
}

.slot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: transparent;
  transition: all var(--transition-medium);
  pointer-events: none;
}

/* Left column items (draggable traits) */
.item {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
  color: white;
  border-color: var(--accent-blue);
  cursor: grab;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.item:active,
.item.dragging {
  cursor: grabbing;
  opacity: 0.6;
  transform: scale(0.95);
}

/* Right column slots (drop zones) */
#right-column .slot:not(.item) {
  border-style: dashed;
  color: var(--text-secondary);
}

/* Drop zone highlighting */
.slot.drop-zone-active {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  border-style: solid;
  animation: pulse 1.5s ease-in-out infinite;
}

.slot.drop-zone-hover {
  border-color: var(--accent-green);
  background: rgba(34, 197, 94, 0.15);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

@keyframes pulse {
  0%,
  100% {
    border-color: var(--accent-gold);
  }
  50% {
    border-color: rgba(245, 158, 11, 0.5);
  }
}

/* Mobile tap selection mode */
.slot.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  animation: selected-pulse 1s ease-in-out infinite;
}

@keyframes selected-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
  }
}

/* Hidden items */
.slot.hidden-item {
  visibility: hidden;
  pointer-events: none;
}

/* Progress Bar */
#progress-bar {
  width: 100%;
  max-width: 700px;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 30px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

#progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
  border-radius: 4px;
  transition: width var(--transition-slow);
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 10px;
  text-align: center;
}

/* Buttons */
#complete-button {
  margin-top: 25px;
  padding: 14px 40px;
  min-width: 160px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

#complete-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#complete-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile Mode Indicator */
.mobile-mode-indicator {
  display: none;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  backdrop-filter: blur(10px);
}

.mobile-mode-indicator .icon {
  margin-right: 8px;
}

/* ============ RESULT PAGE STYLES ============ */

.result-container {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

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

.result-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Profile Cards */
.profile-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.profile-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 25px 35px;
  backdrop-filter: blur(10px);
  min-width: 200px;
}

.profile-card.primary {
  border-color: var(--accent-gold);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.profile-card.secondary {
  border-color: var(--text-secondary);
}

.profile-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.profile-card-value {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Chart Container */
#chart {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

#chart canvas {
  border-radius: 12px;
  max-width: 100%;
}

/* Description List */
.disc-descriptions {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 25px 30px;
  margin: 30px 0;
  text-align: left;
  backdrop-filter: blur(10px);
}

.disc-descriptions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.disc-descriptions li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.disc-descriptions li:last-child {
  border-bottom: none;
}

.disc-descriptions .disc-type {
  font-weight: 700;
  min-width: 140px;
}

.disc-descriptions .disc-desc {
  color: var(--text-secondary);
}

.disc-note {
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 20px;
  text-align: center;
}

/* Sharing Section */
.share-section {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 25px 30px;
  margin-top: 30px;
  backdrop-filter: blur(10px);
}

.share-section h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-medium);
  text-decoration: none;
  color: white;
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-btn.copy-link {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.share-btn.email {
  background: linear-gradient(135deg, #64748b, #475569);
}

.share-btn.facebook {
  background: linear-gradient(135deg, #1877f2, #0c5dc7);
}

.share-btn.twitter {
  background: linear-gradient(135deg, #1da1f2, #0c85d0);
}

.share-btn.linkedin {
  background: linear-gradient(135deg, #0077b5, #005e93);
}

.share-btn.whatsapp {
  background: linear-gradient(135deg, #25d366, #1da851);
}

.share-btn.download {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
}

/* Copy success tooltip */
.copy-tooltip {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent-green);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  opacity: 0;
  transition: all var(--transition-medium);
  pointer-events: none;
  z-index: 1000;
}

.copy-tooltip.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 15px;
    justify-content: flex-start;
    padding-top: 30px;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .header p,
  h4 {
    font-size: 0.9rem;
  }

  .container {
    flex-direction: column;
    gap: 25px;
    align-items: center;
  }

  .column {
    max-width: 100%;
    width: 100%;
  }

  .mobile-mode-indicator {
    display: block;
  }

  .slot {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  #progress-bar {
    max-width: 100%;
  }

  /* Result page mobile */
  .profile-cards {
    flex-direction: column;
    align-items: center;
  }

  .profile-card {
    width: 100%;
    max-width: 280px;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .disc-descriptions li {
    flex-direction: column;
    gap: 5px;
  }

  .disc-descriptions .disc-type {
    min-width: auto;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .share-section,
  .mobile-mode-indicator {
    display: none;
  }
}
