/* ============================================
   MPU easy - Global Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Primary */
  --color-primary: #4361EE;
  --color-primary-hover: #3A56D4;
  --color-primary-light: #EBF0FF;

  /* Accent */
  --color-orange: #F97316;
  --color-coral: #F2734F;
  --color-red: #EF4444;
  --color-green: #22C55E;
  --color-yellow: #F59E0B;

  /* Navy */
  --color-navy: #3B5998;
  --color-navy-dark: rgb(55, 61, 98);

  /* Neutrals */
  --color-bg: #F0F2F8;
  --color-surface: #FFFFFF;
  --color-text: #1A2138;
  --color-text-secondary: #1e345f;
  --color-text-muted: #C5CEE0;



  /* new styles */
  --color-border: #E4E9F2;
  --color-border-hover: #d4d9e5;
  --color-box-shadow: hsla(225, 16%, 58%, 0.3);
  --color-button-bg: #DDE3F4;
  --color-button-text: #29313f;
  --color-button-border: rgba(122, 154, 218, 0.071);
  --color-button-border-2: rgba(114, 145, 207, 0.201);


  /* Layout */
  --sidebar-width: 210px;
  --header-height: 80px;

  /* Font */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 10px;
  --radius-pill: 10px;

  /* Shadow */
  --shadow-card: 0 2px 12px rgba(26, 33, 56, 0.06);
  --shadow-hover: 0 4px 20px rgba(26, 33, 56, 0.10);

  /* Transitions */
  --transition: 200ms ease;
}



/* --- Adjusting the input arrows (spin-buttons) in the input field --- */
input[type=number] {
  /*for absolutely positioning spinners*/
  position: relative;
  padding: 5px;
  padding-right: 25px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  opacity: 1;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: inner-spin-button !important;
  width: 25px;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
}



/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


header {
  margin: 0 0 5px
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
}


/* --- Page Layout --- */
.app-header {
  display: flex;
  align-items: center;
  padding: 20px 32px;
  gap: 24px;
}

.app-body {
  display: flex;
  gap: 24px;
  padding: 0 32px 32px;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}


/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  width: var(--sidebar-width);
}

.logo-icon {
  width: 60px;
  height: 60px;
}

.logo-text {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-left: 20px;
}

.logo-text-mpu {
  color: var(--color-primary);
}

.logo-text-easy {
  color: var(--color-orange);
  font-style: italic;
}


/* --- Header --- */
.header-title {
  flex: 1;
}

.header-title h1 {
  font-size: 1.45rem;
  font-weight: 550;
  color: var(--color-navy-dark);
  line-height: 1.3;
}

.header-title p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.header-icon-btn:hover {
  border: 1.5px solid var(--color-border-hover);
  box-shadow: 0 2px 8px var(--color-box-shadow);
}

.header-icon-btn .icon {
  width: 20px;
  height: 20px;
  background-color: var(--color-text-secondary);
}

.header-icon-btn:hover .icon {
  background-color: var(--color-primary);
}

.notification-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--color-red);
  border-radius: 50%;
  border: 2px solid var(--color-surface);
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 20px 2px 2px;
  border: 1.5px solid #ffffff00;
  border-radius: var(--radius-pill);
  transition: background var(--transition);
  cursor: pointer;
}

.header-profile:hover {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-hover);
  box-shadow: 0 2px 8px var(--color-box-shadow);
}

.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-light), #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy-dark);
  line-height: 1.3;
}

.profile-email {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}


/* --- Sidebar Navigation --- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px 0;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-separator {
  height: 1px;
  background: var(--color-border);
  margin: 12px 10px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color var(--transition);
  position: relative;
  cursor: pointer;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--color-primary);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-item:hover {
  color: var(--color-primary);
}

.sidebar-item:hover .sidebar-icon {
  background-color: var(--color-primary);
}

.sidebar-item.active {
  color: var(--color-primary);
  font-weight: 600;
}

.sidebar-item.active::before {
  opacity: 1;
}

.sidebar-item.active .sidebar-icon {
  background-color: var(--color-primary);
}


/* --- Sidebar Icons (mask-image approach) --- */
.sidebar-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background-color: var(--color-text-secondary);
  transition: background-color var(--transition);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.icon-close {
  -webkit-mask-image: url('../assets/svg/symbols/close.svg');
  mask-image: url('../assets/svg/symbols/close.svg');
}

.icon-menu {
  -webkit-mask-image: url('../assets/svg/symbols/menu.svg');
  mask-image: url('../assets/svg/symbols/menu.svg');
}

.icon-home {
  -webkit-mask-image: url('../assets/svg/symbols/home.svg');
  mask-image: url('../assets/svg/symbols/home.svg');
}

.icon-bar-chart {
  -webkit-mask-image: url('../assets/svg/symbols/bar-chart.svg');
  mask-image: url('../assets/svg/symbols/bar-chart.svg');
}

.icon-analytics {
  -webkit-mask-image: url('../assets/svg/symbols/analytics.svg');
  mask-image: url('../assets/svg/symbols/analytics.svg');
}

.icon-calendar {
  -webkit-mask-image: url('../assets/svg/symbols/calendar.svg');
  mask-image: url('../assets/svg/symbols/calendar.svg');
}

.icon-person {
  -webkit-mask-image: url('../assets/svg/symbols/person.svg');
  mask-image: url('../assets/svg/symbols/person.svg');
}

.icon-notifications {
  -webkit-mask-image: url('../assets/svg/symbols/notifications.svg');
  mask-image: url('../assets/svg/symbols/notifications.svg');
}

.icon-settings {
  -webkit-mask-image: url('../assets/svg/symbols/settings-sharp.svg');
  mask-image: url('../assets/svg/symbols/settings-sharp.svg');
}

.icon-info {
  -webkit-mask-image: url('../assets/svg/symbols/information-circle.svg');
  mask-image: url('../assets/svg/symbols/information-circle.svg');
}

.icon-logout {
  -webkit-mask-image: url('../assets/svg/symbols/log-out.svg');
  mask-image: url('../assets/svg/symbols/log-out.svg');
}

.icon-rocket {
  -webkit-mask-image: url('../assets/svg/symbols/rocket.svg');
  mask-image: url('../assets/svg/symbols/rocket.svg');
}

.icon-people {
  -webkit-mask-image: url('../assets/svg/symbols/people.svg');
  mask-image: url('../assets/svg/symbols/people.svg');
}


/* Header icon variant (same mask approach) */
.icon {
  display: inline-block;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  transition: background-color var(--transition);
}

.icon-settings-outline {
  -webkit-mask-image: url('../assets/svg/symbols/settings-outline.svg');
  mask-image: url('../assets/svg/symbols/settings-outline.svg');
}

.icon-notifications-outline {
  -webkit-mask-image: url('../assets/svg/symbols/notifications-outline.svg');
  mask-image: url('../assets/svg/symbols/notifications-outline.svg');
}


/* --- Category Buttons (Startseite) --- */
.category-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 10px 28px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  color: var(--color-navy-dark);
  background: var(--color-surface);
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid var(--color-button-border-2);
}

.category-btn:hover {
  background: #4070ff;
  color: #fff;
  border-color: #3060ee;
  box-shadow: 0 2px 8px rgba(64, 112, 255, 0.3);
}

.category-btn.active {
  background: var(--color-button-bg);
  color: var(--color-navy-dark);
  border-color: var(--color-button-border);
}

.category-btn.active:hover {
  background: #4070ff;
  color: #fff;
  border-color: #3060ee;
  box-shadow: 0 2px 8px rgba(64, 112, 255, 0.3);
}


/* --- Test Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.test-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.test-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.card-status-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: -3px;
}

.card-status-icon.status-success {
  background: var(--color-green);
}

.card-status-icon.status-warning {
  background: var(--color-yellow);
}

.card-status-icon.status-error {
  background: var(--color-red);
}

.card-status-icon.status-muted {
  background: var(--color-text-muted);
}

.card-status-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-navy-dark);
}

.card-description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-meta-label {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.card-meta-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-navy-dark);
}

/* --- Progress Ring --- */
.progress-ring {
  position: relative;
  width: 36px;
  height: 36px;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 3;
}

.progress-ring-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  font-weight: 700;
  color: var(--color-navy-dark);
}


/* --- Card Buttons --- */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  display: inline-block;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  border: 1.5px solid var(--color-button-border);
}

.card-btn-info:hover {
  background: #4070ff;
  color: #fff;
  border-color: #3060ee;
  box-shadow: 0 2px 4px rgba(64, 112, 255, 0.3);
}

.card-btn-results:hover {
  background: #ffc34b;
  color: #fff;
  border-color: #f0b530;
  box-shadow: 0 2px 8px rgba(255, 195, 75, 0.3);
}

.card-btn-start:hover {
  background: #fe6c82;
  color: #fff;
  border-color: #fe4d68;
  box-shadow: 0 2px 8px rgba(254, 108, 130, 0.3);
}


/* --- Tab Navigation --- */
.tab-nav {
  position: relative;
  display: flex;
  gap: 0;
  border-bottom: none;
  margin-bottom: 10px;
  padding-bottom: 3px;
}

.tab-nav:not(.tab-nav-scroll)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
  pointer-events: none;
}

/* Scrollable tab wrapper */
.tab-nav-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-bottom: 10px;
}

/* Full-width grey baseline across the entire wrapper */
.tab-nav-wrapper::after {
  content: '';
  position: absolute;
  bottom: 3px;                          /* aligned with tab item borders */
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
  pointer-events: none;
}

.tab-nav-wrapper > .tab-nav-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;               /* Firefox */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 3px;                 /* room for active border overhang */
}

.tab-nav-scroll::-webkit-scrollbar {
  display: none;                        /* Chrome/Safari */
}

.tab-nav-scroll .tab-item {
  white-space: nowrap;
  flex-shrink: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: 0;
}

.tab-nav-scroll .tab-item.active {
  border-bottom: 5px solid var(--color-primary);
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  margin-bottom: -3px;                 /* extend into padding space, below grey line */
}

/* Scroll arrow buttons — absolutely positioned overlays, no layout impact */
.tab-scroll-btn {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  bottom: 5px;                           /* exclude underline area, align with tab text */
  width: 32px;
  background: linear-gradient(to right, var(--color-surface) 60%, transparent);
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.6rem;
  padding: 0;
  z-index: 2;
  transition: color var(--transition), opacity var(--transition);
}

.tab-scroll-btn.tab-scroll-left {
  left: 0;
}

.tab-scroll-btn.tab-scroll-right {
  right: 0;
  background: linear-gradient(to left, var(--color-surface) 60%, transparent);
}

.tab-scroll-btn:hover {
  color: var(--color-primary);
}

.tab-nav-wrapper.has-overflow .tab-scroll-btn {
  display: flex;
}

.tab-item {
  padding: 16px 20px 12px 20px;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -5px;
  transition: color var(--transition), border-color var(--transition);
  font-weight: 500;
}

.tab-item:hover {
  color: var(--color-primary);
}

.tab-item.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  border-bottom-width: 4px;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  font-weight: 600;
  margin-bottom: -5px;
}

/* Override for single-tab pages (config, result) */
.tab-nav:not(.tab-nav-scroll) .tab-item {
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 0;
}

.tab-nav:not(.tab-nav-scroll) .tab-item.active {
  border-bottom: 5px solid var(--color-primary);
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  margin-bottom: -3px;
}


/* --- Content Panel --- */
.content-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 0 15px;
}

.content-panel > .tab-nav,
.content-panel > .tab-nav-wrapper {
  padding: 0 32px;
}

.tab-content {
  padding: 18px 32px 32px;
}

.content-placeholder {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 48px 0;
}

.content-panel h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin-bottom: 20px;
}

.content-panel p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.content-panel p:last-child {
  margin-bottom: 0;
}

.content-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin-bottom: 12px;
}

.content-panel h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-navy-dark);
  margin-bottom: 12px;
}

.content-panel ul {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  padding-left: 20px;
  list-style: disc;
}

.content-panel ul:last-child {
  margin-bottom: 0;
}

/* Single screenshot (V1): figure wrapper matches one slot of a screenshot pair. */
.content-screenshot {
  display: block;
  /* Match the width of one image in a .content-screenshot-pair:
     pair has margin 0 10px (→ -20px) and gap 16px between two figures,
     so each figure = (100% - 20px - 16px) / 2 = calc(50% - 18px). */
  max-width: calc(50% - 18px);
  margin: 8px 10px 24px;
}

.content-screenshot img {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.content-screenshot figcaption {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--color-text-secondary);
  text-align: center;
}

/* Two screenshots side-by-side with captions (e.g. Go vs. No-Go trial). */
.content-screenshot-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 10px 24px;
}

.content-screenshot-pair figure {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.content-screenshot-pair img {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.content-screenshot-pair figcaption {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--color-text-secondary);
  text-align: center;
}


/* --- Config Page --- */
.config-section {
  margin-bottom: 32px;
}

.config-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin-bottom: 8px;
}

.config-section-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}


/* --- Radio Buttons (custom) --- */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 40px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}

.radio-option input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.radio-option input[type="radio"]:hover {
  border-color: var(--color-primary);
}

.radio-option input[type="radio"]:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.radio-label {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.4;
}

.radio-option input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.radio-option input[type="checkbox"]:hover {
  border-color: var(--color-primary);
}

.radio-option input[type="checkbox"]:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.radio-option input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.number-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* --- Range Slider (custom) --- */
.slider-container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.slider-label {
  font-size: 0.875rem;
  color: var(--color-text);
  white-space: nowrap;
}

.slider-wrapper {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.slider-value {
  position: absolute;
  top: -32px;
  left: 20%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: box-shadow var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 6px rgba(67, 97, 238, 0.15);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 6px 0 0;
}

.slider-ticks span {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  width: 20px;
  text-align: center;
}


/* --- Number Input --- */
.number-input-container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.number-input-label {
  font-size: 0.875rem;
  color: var(--color-text);
  white-space: nowrap;
}

.number-input {
  width: 80px;
  padding: 8px 12px;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy-dark);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.number-input:hover {
  /* border-color: #3060ee; */

  border: 1.5px solid var(--color-border-hover);
  box-shadow: 0 2px 8px var(--color-box-shadow);
}

.number-input:focus {
  /* border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light); */

  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(64, 112, 255, 0.3);
}


/* --- Toggle Switch --- */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.toggle-label-text {
  font-size: 0.875rem;
  color: var(--color-text);
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  /* outline: 1.5px solid var(--color-primary); */
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-button-bg);
  border-radius: 13px;
  transition: background var(--transition);
  border: 1.5px solid var(--color-box-shadow);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--color-primary);
}

.toggle-switch input:checked+.toggle-slider::after {
  transform: translateX(22px);
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 2px 8px var(--color-box-shadow);
}


/* --- Primary Action Button --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 48px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  /* border-radius: 15px;  */
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 2px 4px rgba(67, 97, 238, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}


/* --- Utility --- */
.flex-end {
  display: flex;
  justify-content: flex-end;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}


/* ============================================
   Test Page (Full-screen test execution)
   ============================================ */

.test-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  user-select: none;
}

/* Info text at top center */
.test-info-text {
  position: absolute;
  max-width: 1300px;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .8rem;
  color: var(--color-text);
  text-align: center;
  white-space: nowrap;
}

.test-info-text.hidden {
  display: none;
}

/* Close button (X) top right */
.test-close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.test-close-btn img {
  width: 24px;
  height: 24px;
  transition: opacity var(--transition);
}

.test-close-btn:hover img {
  opacity: 0.6;
}

/* 3x3 Grid */
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 180px);
  grid-template-rows: repeat(3, 180px);
  gap: 0;
  background: var(--color-surface);
}

.test-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Arrow image inside center cell */
.test-arrow {
  width: 120px;
  height: 120px;
  transform: rotate(180deg);
}

/* Variant 2 arrow: rotation is set inline per stimulus */
.test-arrow-v2 {
  width: 120px;
  height: 120px;
}

/* Variant 3 arrow: two arrows rendered in parallel, rotation inline per stimulus */
.test-arrow-v3 {
  width: 120px;
  height: 120px;
}

/* Variant 4: arrow (rotation inline per stimulus) + cross, rendered simultaneously */
.test-arrow-v4 {
  width: 120px;
  height: 120px;
}

.test-cross-v4 {
  width: 120px;
  height: 120px;
}

/* Variant 5: arrow (rotation inline per stimulus) + cross, rendered simultaneously,
   user interprets arrow direction from observer-at-cross perspective */
.test-arrow-v5 {
  width: 120px;
  height: 120px;
}

.test-cross-v5 {
  width: 120px;
  height: 120px;
}

/* Variant 6: arrow (rotation inline per stimulus) + cross, rendered simultaneously,
   user detects 1-back repeats of relevant items (arrow=down or cross at bottom). */
.test-arrow-v6 {
  width: 120px;
  height: 120px;
}

.test-cross-v6 {
  width: 120px;
  height: 120px;
}

/* Variant 7: cross-search task. Custom layout — one white rectangle wraps
   both the search-item box (left) and the 6×6 matrix (right). The rectangle
   sits in the flex flow of .test-page, which already centers it horizontally
   and re-centers it on viewport resize. The countdown is rendered into a
   screen-centered overlay (separate DOM node) and now visually aligns with
   the rectangle's center. */
.arrow-cross-v7-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 10px;
  background: var(--color-surface);
  box-sizing: border-box;
}

.arrow-cross-v7-search {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-top: 20px;
}

/*
.arrow-cross-v7-cross-search {
  width: 300px;
  height: 300px;
}
 */

.arrow-cross-v7-matrix {
  width: 900px;
  height: 900px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 0;
  box-sizing: border-box;
}

.arrow-cross-v7-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-cross-v7-cross-cell {
  width: 125px;
  height: 125px;
}

/* Screen-centered countdown overlay used by V7 (and any future variant that
   declares customLayout). Sits above the layout regardless of grid position. */
.arrow-cross-v7-countdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}

/* V7 info text spans two lines — override the global nowrap default without
   touching the generic `.test-info-text` class used by V1–V6. */
.test-info-text-v7-multiline {
  line-height: 1.4;
}

/* Variant 8: arrow-search task. Custom layout — one white rectangle wraps
   both the search-item box (left) and the 8×8 matrix (right). Mirrors the
   V7 structure but with a larger matrix and arrow assets that may be
   rotated 180°. The countdown is rendered into a screen-centered overlay
   (separate DOM node), aligned with the rectangle's center. */
.arrow-cross-v8-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 10px;
  background: var(--color-surface);
  box-sizing: border-box;
}

.arrow-cross-v8-search {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-top: 20px;
}

.arrow-cross-v8-arrow-search {
  width: 140px;
  height: 140px;
}

/* 8×8 matrix sized to fit 1280×800 alongside the search box and info text.
   Cells are 90 px so the 7 distinct arrow types stay visually distinguishable
   at typical viewing distances; increase if a future review prefers larger
   detail at the cost of vertical headroom. */
.arrow-cross-v8-matrix {
  width: 900px;
  height: 900px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 0;
  box-sizing: border-box;
}

.arrow-cross-v8-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-cross-v8-arrow-cell {
  width: 100px;
  height: 100px;
}

/* Screen-centered countdown overlay used by V8 (analogous to V7). */
.arrow-cross-v8-countdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}

/* V8 info text spans two lines — same rules as V7 but variant-namespaced
   so V8 stays independent of any future V7 tweaks. */
.test-info-text-v8-multiline {
  line-height: 1.4;
}

/* Countdown number */
.test-countdown {
  font-size: 8rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}


/* ============================================
   Result Page
   ============================================ */

/* Overview: cards left, ring right */
.result-overview {
  display: flex;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 16px 0;
}

.result-score-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  min-width: 200px;
}

/* Large progress ring */
.result-ring-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.result-ring-container svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.result-ring-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 8;
}

.result-ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.result-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-navy-dark);
}

.result-rating {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.rating-good {
  color: var(--color-green);
}

.rating-average {
  color: var(--color-yellow);
}

.rating-sufficient {
  color: var(--color-orange);
}

.rating-failed {
  color: var(--color-red);
}

/* Statistics cards */
.result-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* History section */
.result-history-section {
  margin-top: 8px;
}

.result-chart-section {
  margin-top: 24px;
}

.result-stat-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-stat-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.result-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-navy-dark);
}

.result-stat-correct {
  color: var(--color-green);
}

.result-stat-error {
  color: var(--color-red);
}

.result-stat-missed {
  color: var(--color-yellow);
}

/* Hidden on screen, visible in print */
.print-only {
  display: none;
}


/* ============================================
   Responsive: Small screens (< 768px)
   ============================================ */
@media (max-width: 1024px) and (orientation: portrait), (max-width: 767px) {

  /* Hide logo */
  .logo {
    display: none;
  }

  /* Sidebar: icons only, 112px wide */
  .sidebar {
    width: 50px;
  }

  .sidebar-item {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }

  .sidebar-item span:not(.sidebar-icon) {
    display: none;
  }

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

  .sidebar-separator {
    margin: 12px 20px;
  }

  /* Active indicator: center it */
  .sidebar-item::before {
    height: 20px;
  }

  /* Adjust body padding */
  .app-header {
    padding: 16px 20px;
  }

  .app-body {
    gap: 16px;
    padding: 0 20px 24px;
  }

  /* Header: give title more room */
  .header-title h1 {
    font-size: 1.4rem;
  }

  .header-title p {
    font-size: 0.85rem;
  }

  /* Hide profile details, keep avatar */
  .profile-info {
    display: none;
  }

  /* Stack result overview vertically */
  .result-overview {
    flex-direction: column;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }
}


/* --- Disable Options --- */
.no-option {
    pointer-events: none;
    color: #9097a4;
}


/* ============================================
   Print Styles
   ============================================ */
@media print {

  /* Hide non-content elements */
  .logo,
  .header-actions,
  .sidebar,
  .tab-nav,
  .flex-end {
    display: none !important;
  }

  /* Reset layout: no sidebar, full width */
  .app-body {
    display: block;
    padding: 0;
  }

  .app-header {
    padding: 10px 0 8px 10px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 16px;
  }

  .main-content {
    padding: 0;
  }

  .content-panel {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  /* Keep overview in row layout for print */
  .result-overview {
    flex-direction: row;
  }

  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Show print-only elements */
  .print-only {
    display: block !important;
  }

  /* Chart section always starts on a new page */
  .result-chart-section {
    break-before: page;
  }

  /* Ensure colors print */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}


