/* =========================================================
   VERITRANS CTF — V3 LAYOUT TUNING
   Wider profile, shorter frame, landscape categories
========================================================= */

/* Slightly shorter outer frame */
.kctf-v3-page {
  min-height: 100vh !important;
  padding: 22px !important;
}

.kctf-v3-frame {
  width: min(2200px, 96vw) !important;

  min-height: 84vh !important;
  height: auto !important;
}

.kctf-v3-inner {
  min-height: 84vh !important;
  height: auto !important;

  padding:
    clamp(1.7rem, 2.4vw, 3.3rem)
    clamp(1.8rem, 2.8vw, 4rem) !important;
}

.kctf-v3-content {
  min-height: calc(84vh - 90px) !important;
  height: auto !important;
}

/* Header more compact */
.kctf-v3-header {
  margin-bottom: clamp(1.2rem, 1.8vw, 2rem) !important;
}

.kctf-v3-status {
  margin-bottom: 0.65rem !important;
}

.kctf-v3-welcome {
  margin-bottom: 0.2rem !important;
}

.kctf-v3-subtitle {
  margin-top: 0.65rem !important;
}

/* Wider left side */
.kctf-v3-grid {
  grid-template-columns:
    minmax(520px, 0.95fr)
    minmax(680px, 1.25fr) !important;

  gap: clamp(1.2rem, 1.7vw, 1.8rem) !important;
}

/* Profile fills left column */
.kctf-v3-left,
.kctf-v3-right {
  min-width: 0;
  height: 100% !important;
}

.kctf-v3-profile {
  min-height: 0 !important;
}

/* Make image / username area wider */
.kctf-v3-profile-layout {
  grid-template-columns:
    minmax(265px, 0.92fr)
    minmax(270px, 1.08fr) !important;

  gap: 1.35rem !important;
}

/* Area prepared for future image */
.kctf-v3-dot-user {
  width: 100% !important;
  min-width: 265px !important;

  min-height: 390px !important;

  border-radius: 16px !important;

  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(22, 140, 255, 0.16),
      transparent 44%
    ),
    linear-gradient(
      180deg,
      rgba(22, 140, 255, 0.06),
      rgba(0, 0, 0, 0.5)
    ) !important;
}

#kctf-v3-user-canvas {
  min-height: 370px !important;
}

/* Slightly larger profile information */
.kctf-v3-info-title {
  font-size: 1.3rem !important;
}

.kctf-v3-info-row {
  grid-template-columns:
    108px
    10px
    minmax(0, 1fr) !important;

  font-size: 0.92rem !important;
  line-height: 1.5 !important;
}

.kctf-v3-info-table {
  gap: 0.72rem !important;
}

/* Compact session controls */
.kctf-v3-controls {
  padding: 1rem 1.15rem !important;
}

.kctf-v3-controls-description {
  margin-bottom: 0.8rem !important;
}

/* Right category panel fills remaining space */
.kctf-v3-category-panel {
  min-height: 0 !important;
  padding: 1.15rem !important;
}

.kctf-v3-category-header {
  margin-bottom: 0.9rem !important;
}

/* =========================================
   LANDSCAPE CATEGORY GRID
   2 wide columns instead of portrait cards
========================================= */

.kctf-v3-categories {
  flex: 1 1 auto !important;

  display: grid !important;
  grid-template-columns:
    repeat(2, minmax(280px, 1fr)) !important;

  grid-template-rows:
    repeat(4, minmax(118px, 1fr)) !important;

  gap: 0.85rem !important;
}

/* All cards use the same green neon */
.kctf-v3-category {
  --accent: #168cff !important;

  min-height: 118px !important;
  height: auto !important;

  padding: 1rem 1.15rem !important;

  display: grid !important;
  grid-template-columns:
    minmax(0, 1fr)
    52px !important;

  grid-template-rows:
    auto
    1fr
    auto !important;

  column-gap: 1rem !important;
  row-gap: 0.35rem !important;

  background:
    radial-gradient(
      circle at 100% 50%,
      rgba(22, 140, 255, 0.11),
      transparent 40%
    ),
    linear-gradient(
      135deg,
      rgba(5, 24, 13, 0.96),
      rgba(0, 9, 5, 0.97)
    ) !important;

  border:
    1px solid rgba(22, 140, 255, 0.46) !important;

  border-radius: 10px !important;

  box-shadow:
    0 0 22px rgba(22, 140, 255, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

.kctf-v3-category::before {
  height: 2px !important;

  background:
    linear-gradient(
      90deg,
      transparent,
      #168cff,
      transparent
    ) !important;

  opacity: 0.7 !important;
}

.kctf-v3-category::after {
  right: -38px !important;
  bottom: -38px !important;

  width: 105px !important;
  height: 105px !important;

  background: #168cff !important;
  opacity: 0.08 !important;
}

/* Category title */
.kctf-v3-category-name {
  grid-column: 1;
  grid-row: 1;

  margin: 0 !important;

  color: #168cff !important;

  font-size: clamp(1rem, 1.05vw, 1.3rem) !important;
  line-height: 1.15 !important;

  text-shadow:
    0 0 13px rgba(22, 140, 255, 0.58) !important;
}

/* Description sits below title */
.kctf-v3-category-description {
  grid-column: 1;
  grid-row: 2;

  max-width: none !important;
  margin: 0.35rem 0 0 !important;

  color: #8fae99 !important;

  font-size: 0.78rem !important;
  line-height: 1.48 !important;
}

/* Command at bottom left */
.kctf-v3-category-footer {
  grid-column: 1;
  grid-row: 3;

  margin: 0.35rem 0 0 !important;

  justify-content: flex-start !important;
}

.kctf-v3-category-command {
  color: #b5d8c0 !important;
}

/* Icon stays on the right */
.kctf-v3-category-icon {
  grid-column: 2;
  grid-row: 1 / 4;

  align-self: center;
  justify-self: center;

  width: 42px !important;
  height: 42px !important;

  color: #001307 !important;
  background: #168cff !important;

  box-shadow:
    0 0 12px rgba(22, 140, 255, 0.9),
    0 0 30px rgba(22, 140, 255, 0.35) !important;
}

.kctf-v3-category:hover {
  transform: translateY(-3px) !important;

  border-color: #168cff !important;

  box-shadow:
    0 0 32px rgba(22, 140, 255, 0.16),
    0 14px 34px rgba(0, 0, 0, 0.34) !important;
}

/* The final seventh card fills the full row */
.kctf-v3-categories > .kctf-v3-category:last-child:nth-child(odd) {
  grid-column: 1 / -1 !important;
}

/* Build label takes less vertical space */
.kctf-v3-build {
  padding-top: 0.35rem !important;
}

/* =========================================
   Medium screens
========================================= */

@media (max-width: 1450px) {
  .kctf-v3-grid {
    grid-template-columns:
      minmax(470px, 0.95fr)
      minmax(590px, 1.2fr) !important;
  }

  .kctf-v3-profile-layout {
    grid-template-columns:
      minmax(235px, 0.88fr)
      minmax(250px, 1.12fr) !important;
  }

  .kctf-v3-dot-user {
    min-width: 235px !important;
  }

  .kctf-v3-categories {
    grid-template-columns:
      repeat(2, minmax(240px, 1fr)) !important;
  }
}

/* Stack layout */
@media (max-width: 1100px) {
  .kctf-v3-frame,
  .kctf-v3-inner,
  .kctf-v3-content {
    min-height: auto !important;
  }

  .kctf-v3-grid {
    grid-template-columns: 1fr !important;
  }

  .kctf-v3-profile-layout {
    grid-template-columns:
      minmax(260px, 0.8fr)
      minmax(300px, 1.2fr) !important;
  }

  .kctf-v3-categories {
    grid-template-rows: auto !important;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .kctf-v3-page {
    padding: 10px !important;
  }

  .kctf-v3-frame {
    width: 100% !important;
  }

  .kctf-v3-profile-layout {
    grid-template-columns: 1fr !important;
  }

  .kctf-v3-dot-user {
    min-width: 0 !important;
    min-height: 280px !important;
  }

  #kctf-v3-user-canvas {
    min-height: 260px !important;
  }

  .kctf-v3-categories {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  .kctf-v3-categories > .kctf-v3-category:last-child:nth-child(odd) {
    grid-column: auto !important;
  }
}