/* =========================================================================
   1. SYSTEM RIG & SPECS TILES
   ========================================================================= */
.specs-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 8px;
  width: 100%;
}

.spec-tile {
  background: rgba(10, 17, 32, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: border-color .2s ease, transform .2s ease;
}

.spec-tile:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  background: rgba(14, 25, 48, 0.8);
}

.spec-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-family: 'Maple Mono', monospace;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spec-val {
  font-size: clamp(0.76rem, 1.2vw, 0.85rem);
  font-weight: 700;
  color: var(--text-main);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.25;
  word-break: break-word;
}

.spec-highlight { color: var(--accent-cyan); }
.spec-violet { color: var(--accent-violet); }
.spec-emerald { color: var(--accent-emerald); }

@media (max-width: 520px) {
  .specs-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .spec-tile {
    padding: 8px 10px;
  }
}

/* =========================================================================
   2. PERIPHERALS & HARDWARE RHYTHM GEAR (SayoDevice, Wacom, AE68 Pro)
   ========================================================================= */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
  width: 100%;
}

.gear-tile {
  background: rgba(8, 15, 30, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gear-tile:hover {
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-2px);
}

.gear-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.gear-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  flex: 1 1 auto;
}

.gear-tag {
  font-size: 0.64rem;
  font-family: 'Maple Mono', monospace;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
}

.gear-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Hall Effect Keypad Continuous Travel Box */
.he-travel-box {
  background: rgba(5, 10, 22, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.he-travel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-family: 'Maple Mono', monospace;
  color: var(--text-muted);
  gap: 4px;
  flex-wrap: wrap;
}

.he-bar-track {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.he-bar-fill {
  height: 100%;
  width: 37.5%; /* 1.5mm / 4.0mm = 37.5% */
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 6px;
  position: relative;
}

.he-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f43f5e;
  box-shadow: 0 0 4px #f43f5e;
}

.he-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  font-size: 0.66rem;
  font-family: 'Maple Mono', monospace;
  color: var(--text-muted);
}

.he-stat-item strong {
  color: var(--accent-cyan);
}

/* Wacom Tablet Area Box */
.tablet-area-box {
  background: rgba(5, 10, 22, 0.85);
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.tablet-dim-text {
  font-family: 'Maple Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-violet);
  font-weight: 600;
}

.tablet-ratio-pill {
  font-size: 0.65rem;
  font-family: 'Maple Mono', monospace;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Keyboard Row Box */
.kb-row-box {
  background: rgba(5, 10, 22, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

/* =========================================================================
   3. FEATURED PROJECTS & DOTFILES
   ========================================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
  width: 100%;
}

.project-card {
  background: rgba(10, 18, 36, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.13);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
  background: rgba(15, 27, 54, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.project-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
}

.project-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.2;
}

.project-link-icon {
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.project-card:hover .project-link-icon {
  color: var(--accent-cyan);
  transform: translate(2px, -2px);
}

.project-desc {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.project-tag {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  font-size: 0.66rem;
  font-family: 'Maple Mono', monospace;
  padding: 2px 7px;
  border-radius: 6px;
}
.project-tag.nix {
  background: rgba(126, 186, 228, 0.1);
  color: #7ebae4;
  border-color: rgba(126, 186, 228, 0.3);
}
.project-tag.osu {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

/* =========================================================================
   4. SHRINE & SPELLCASTING
   ========================================================================= */
.shrine-content {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.shrine-content strong { color: var(--text-main); }

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.badge-item {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-family: 'Maple Mono', monospace;
  padding: 3px 8px;
  border-radius: 8px;
}

.cast-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.cast-btn {
  flex: 1 1 120px;
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: #fff;
  border: none;
  padding: 9px 12px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  min-height: 42px;
}

.cast-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.45);
}
.cast-btn:active {
  transform: scale(0.98);
}
.cast-btn.secondary {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: var(--accent-violet);
  box-shadow: none;
}
.cast-btn.secondary:hover {
  background: rgba(167, 139, 250, 0.25);
  border-color: var(--accent-violet);
}

@media (max-width: 400px) {
  .cast-btn {
    flex: 1 1 100%;
  }
}

/* =========================================================================
   5. OSU! PLAYER SANCTUARY (FEATURED HIGHLIGHT)
   ========================================================================= */
.spec-rose { color: var(--accent-rose); }

.osu-highlight-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.3fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 4px;
}

.osu-profile-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.osu-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.osu-user-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.osu-username {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.osu-country-flag {
  font-size: 0.65rem;
  font-family: 'Maple Mono', monospace;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
}

.osu-id-tag {
  font-family: 'Maple Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-rose);
}

.osu-bio-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* 4-Stat Micro Grid */
.osu-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.osu-stat-tile {
  background: rgba(5, 10, 22, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.osu-stat-tile:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(8, 15, 30, 0.95);
  transform: translateY(-1px);
}

.osu-stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-family: 'Maple Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osu-stat-val {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osu-actions-row {
  margin-top: 4px;
}

.osu-open-btn {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.2s ease;
  min-height: 40px;
  width: 100%;
}

.osu-open-btn:hover {
  background: #f43f5e;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}

/* =========================================================================
   Top Plays Showcase & Top 5 View
   ========================================================================= */
.osu-scores-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  background: rgba(4, 9, 20, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 12px;
  padding: 12px;
}

.osu-scores-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.osu-scores-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}

.osu-tab-controls {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.osu-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.osu-tab-btn:hover {
  color: var(--text-main);
}

.osu-tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
}

/* #1 Top Play Banner */
.osu-top1-banner {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  min-height: 140px;
}

.osu-top1-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2);
}

.osu-top1-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
  min-height: 140px;
  background: linear-gradient(135deg, rgba(6, 12, 28, 0.85) 0%, rgba(6, 12, 28, 0.94) 100%);
}

.osu-top1-badge {
  display: inline-block;
  font-family: 'Maple Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.osu-top1-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osu-top1-artist {
  font-size: 0.76rem;
  color: var(--accent-cyan);
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osu-top1-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.osu-top1-pp {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  line-height: 1;
}

.osu-top1-substats {
  display: flex;
  align-items: center;
  gap: 5px;
}

.osu-pill-acc, .osu-pill-mods, .osu-pill-rank {
  font-family: 'Maple Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
}

.osu-pill-acc {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
}

.osu-pill-mods {
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: #a78bfa;
}

.osu-pill-rank {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

/* Top 5 List */
.osu-top5-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.osu-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 0;
}

.osu-score-row:hover {
  background: rgba(20, 30, 55, 0.9);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(2px);
}

.osu-score-rank-num {
  font-family: 'Maple Mono', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-dim);
  width: 20px;
  flex-shrink: 0;
}

.osu-score-rank-num.gold { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.5); }
.osu-score-rank-num.silver { color: #cbd5e1; }
.osu-score-rank-num.bronze { color: #f97316; }

.osu-score-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.osu-score-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osu-score-diff {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osu-score-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.osu-score-pp {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.osu-score-sub {
  display: flex;
  align-items: center;
  gap: 4px;
}

.osu-score-acc {
  font-family: 'Maple Mono', monospace;
  font-size: 0.64rem;
  color: #34d399;
}

.osu-score-mods {
  font-family: 'Maple Mono', monospace;
  font-size: 0.62rem;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  padding: 1px 3px;
  border-radius: 3px;
}

/* Responsive adjustment */
@media (max-width: 820px) {
  .osu-highlight-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}


