/*
 * VirtuaKey - Study'N Fun Hub sanal klavye enstrumani
 * Arke tasarim sistemi (countdown ile ayni kabuk)
 * Path: D:\OneDrive\CODING\APPS\StudyNFun\StudyNFun_Hub\virtuakey\virtuakey.css
 */

:root {
  --background: #00000F;
  --surface-light: rgba(3, 7, 18, 0.2);
  --on-surface: #e0e0e0;
  --primary: #40c4ff;
  --secondary: #00bcd4;
  --success: #4caf50;
  --warning: #ff9800;
  --danger: #f44336;
  --violet: #9c27b0;
  --honey: #fbbf24;
  --border-color: rgba(64, 196, 255, 0.2);
  --card-radius: 8px;
  --shadow: 0 4px 12px rgba(64, 196, 255, 0.075), 0 2px 6px rgba(0, 0, 0, 0.2);
  --standard-spacing: 20px;
  --container-max-width: 1100px;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  --white-h: 210px;
}

html, body {
  margin: 0; padding: 0;
  font-family: Arial, sans-serif;
  background: var(--background);
  color: var(--on-surface);
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}

.stars, .fireflies, .fireflies-front {
  position: fixed; left: 0; top: 0;
  width: 100vw; height: 100vh;
  pointer-events: none; z-index: 0;
}
.fireflies { z-index: 1; }
.fireflies-front { z-index: 2; }

.container { min-height: 100vh; position: relative; z-index: 10; }

.navigation-wrap {
  max-width: var(--container-max-width);
  width: 100%;
  margin: var(--standard-spacing) auto;
  padding: 0 var(--standard-spacing);
  display: flex; flex-direction: column;
  gap: var(--standard-spacing);
  box-sizing: border-box;
}

.top-navigation-header, .header-wrap, .vk-panel, .footer-wrap {
  background: var(--surface-light);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-sizing: border-box;
}

.top-navigation-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--standard-spacing);
}
.top-navigation-header a:first-child {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; height: 36px; box-sizing: border-box;
  background: rgba(64, 196, 255, 0.1);
  border: 1px solid rgba(64, 196, 255, 0.3);
  border-radius: var(--card-radius);
  color: var(--primary); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all 0.3s ease;
}
.top-navigation-header a:first-child::before {
  content: ''; width: 20px; height: 20px; flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 12L5 10M5 10L12 3L19 10M5 10V20C5 20.5523 5.44772 21 6 21H9M19 10L21 12M19 10V20C19 20.5523 18.5523 21 18 21H15M9 21C9.55228 21 10 20.5523 10 20V16C10 15.4477 10.4477 15 11 15H13C13.5523 15 14 15.4477 14 16V20C14 20.5523 14.4477 21 15 21M9 21H15' stroke='%2340c4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.top-navigation-header a:first-child::after { content: 'Hub'; }
.top-navigation-header a:hover { background: rgba(64, 196, 255, 0.2); border-color: var(--primary); }

.header-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: var(--standard-spacing); min-height: 80px;
}
.logo-container { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.main-title {
  font-size: 2.6em; font-weight: 700; margin: 0; width: 100%; text-align: center;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #40c4ff, #9c27b0, #ff9800, #4caf50, #40c4ff);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: vkRainbow 14s linear infinite;
}
@keyframes vkRainbow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.main-logo {
  display: block; margin: 0 auto;
  max-width: min(315px, 100%); width: 100%; height: auto;
  filter: drop-shadow(0 4px 16px rgba(64, 196, 255, 0.35));
}
.subtitle { font-size: 1.1em; color: var(--text-muted); margin: 0; text-align: center; }

.main-content { display: flex; flex-direction: column; gap: var(--standard-spacing); }
.vk-panel { padding: var(--standard-spacing); }

.footer-wrap { padding: var(--standard-spacing); }
.footer-container { display: flex; justify-content: center; }
.copyright { color: var(--honey); font-size: 0.8125rem; font-weight: 500; text-align: center; margin: 0; }

/* ===== CONTROLS ===== */
.vk-panel-ctrl { border-left: 3px solid var(--success); display: flex; flex-direction: column; gap: 14px; }
.vk-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center;
  padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(64,196,255,0.05), rgba(3,7,18,0.45));
  border: 1px solid rgba(64,196,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 14px rgba(0,0,0,0.35);
}
.vk-row-set { gap: 22px; }
.vk-group { display: flex; align-items: center; gap: 10px; }
.vk-lbl { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.vk-val {
  min-width: 28px; text-align: center;
  font-family: "Consolas", "Courier New", monospace; font-size: 22px; font-weight: 700; color: var(--secondary);
}

.vk-inst, .vk-btn {
  font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0.5px;
  padding: 12px 22px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 4px 0 rgba(0,0,0,0.35), 0 8px 16px rgba(0,0,0,0.35);
}
.vk-inst:hover, .vk-btn:hover { background: linear-gradient(180deg, rgba(64,196,255,0.24), rgba(64,196,255,0.06)); color: var(--text-primary); }
.vk-inst:active, .vk-btn:active { transform: translateY(3px); box-shadow: inset 0 3px 10px rgba(0,0,0,0.55), 0 1px 0 rgba(0,0,0,0.35); }
.vk-inst:focus-visible, .vk-btn:focus-visible, .vk-range:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.vk-inst.active {
  transform: translateY(2px);
  color: var(--primary); border-color: var(--primary);
  background: linear-gradient(180deg, rgba(64,196,255,0.28), rgba(64,196,255,0.10));
  box-shadow: inset 0 3px 12px rgba(0,0,0,0.5), 0 0 18px rgba(64,196,255,0.18);
}
.vk-inst.loading { animation: vkPulse 1.2s ease-in-out infinite; }
@keyframes vkPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.vk-btn-sm { padding: 6px 14px; font-size: 18px; line-height: 1; }
.vk-tog { font-size: 13px; padding: 10px 16px; color: var(--text-muted); }
.vk-tog.active {
  color: var(--secondary); border-color: rgba(0, 188, 212, 0.55);
  background: linear-gradient(180deg, rgba(0,188,212,0.26), rgba(0,188,212,0.08));
  transform: translateY(2px);
  box-shadow: inset 0 3px 12px rgba(0,0,0,0.5), 0 0 18px rgba(0,188,212,0.18);
}
#susTog.active { color: var(--honey); border-color: rgba(251,191,36,0.55); background: linear-gradient(180deg, rgba(251,191,36,0.24), rgba(251,191,36,0.06)); }

.vk-range { width: 130px; accent-color: var(--primary); cursor: pointer; }
.vk-group.vk-off { opacity: 0.35; pointer-events: none; }

/* ===== STAGE ===== */
.vk-panel-stage { border-left: 3px solid var(--secondary); display: flex; flex-direction: column; gap: 12px; }
.vk-status { min-height: 18px; font-size: 13px; text-align: center; color: var(--text-muted); letter-spacing: 0.5px; }
.vk-status.err { color: var(--danger); }
.vk-stage { position: relative; }
.vk-hidden { display: none !important; }
.vk-help { margin: 0; font-size: 13px; line-height: 1.6; text-align: center; color: var(--text-muted); }
.vk-help kbd {
  display: inline-block; min-width: 18px; padding: 1px 6px; margin: 0 1px;
  font-family: "Consolas", "Courier New", monospace; font-size: 12px; color: var(--text-primary);
  border: 1px solid rgba(64,196,255,0.35); border-bottom-width: 2px; border-radius: 5px;
  background: rgba(64,196,255,0.08);
}

.vk-gate {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 15, 0.55); border-radius: 12px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.vk-btn-gate { font-size: 16px; padding: 16px 30px; color: var(--primary); border-color: var(--primary); }

/* ===== PIANO ===== */
.vk-piano-wrap { overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.vk-piano {
  position: relative; display: flex;
  min-width: 640px; height: var(--white-h);
  padding: 10px 10px 12px; box-sizing: border-box;
  border-radius: 12px;
  background: linear-gradient(180deg, #0a1020, #03060e);
  border: 1px solid rgba(64,196,255,0.28);
  box-shadow: inset 0 6px 14px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.45);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.vk-white {
  position: relative; flex: 1 1 0; margin: 0 1px;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #d9e2ea 0%, #f7fafc 18%, #ffffff 100%);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.12), 0 2px 3px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: background 0.06s linear, box-shadow 0.06s linear, transform 0.06s linear;
}
.vk-white.down {
  background: linear-gradient(180deg, #7fdcff 0%, #c9f1ff 60%, #e6f9ff 100%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15), 0 0 18px rgba(64,196,255,0.55);
  transform: translateY(2px);
}
.vk-keys { position: relative; display: flex; width: 100%; height: 100%; }
.vk-black {
  position: absolute; top: 0; z-index: 2;
  height: 60%; border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #1a1f2b 0%, #05070c 100%);
  border: 1px solid #000;
  box-shadow: inset 0 -5px 0 rgba(255,255,255,0.06), 0 3px 5px rgba(0,0,0,0.6);
  cursor: pointer; box-sizing: border-box;
  transition: background 0.06s linear, box-shadow 0.06s linear;
}
.vk-black.down {
  background: linear-gradient(180deg, #0a4f6e 0%, #2196f3 100%);
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.1), 0 0 16px rgba(64,196,255,0.7);
}
.vk-k-key, .vk-k-note {
  position: absolute; left: 0; right: 0; text-align: center; pointer-events: none;
  font-family: "Consolas", "Courier New", monospace; font-weight: 700;
}
.vk-white .vk-k-key { bottom: 26px; font-size: 13px; color: #1f5f84; }
.vk-white .vk-k-note { bottom: 10px; font-size: 10px; color: #8a97a5; }
.vk-white.is-c .vk-k-note { color: #d35400; }
.vk-black .vk-k-key { bottom: 8px; font-size: 11px; color: #7fdcff; }
.vk-black .vk-k-note { display: none; }

/* ===== DRUM PADS ===== */
.vk-pads {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px;
  padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, #0a1020, #03060e);
  border: 1px solid rgba(64,196,255,0.28);
  box-shadow: inset 0 6px 14px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.45);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.vk-pad {
  position: relative; aspect-ratio: 1 / 0.82;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--pc, #40c4ff) 45%, transparent);
  background: radial-gradient(120% 120% at 50% 20%, color-mix(in srgb, var(--pc, #40c4ff) 22%, transparent), rgba(3,7,18,0.85) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 0 rgba(0,0,0,0.4), 0 8px 16px rgba(0,0,0,0.35);
  transition: transform 0.05s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.vk-pad.hit {
  transform: translateY(3px);
  background: radial-gradient(120% 120% at 50% 30%, color-mix(in srgb, var(--pc, #40c4ff) 70%, transparent), rgba(3,7,18,0.8) 75%);
  box-shadow: 0 0 22px color-mix(in srgb, var(--pc, #40c4ff) 70%, transparent), inset 0 2px 10px rgba(0,0,0,0.4);
}
.vk-pad-name { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-secondary); text-align: center; pointer-events: none; }
.vk-pad-key {
  font-family: "Consolas", "Courier New", monospace; font-size: 15px; font-weight: 700;
  color: var(--pc, var(--primary)); pointer-events: none;
}

/* ===== CREDITS ===== */
.vk-credits h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }
.vk-credits p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-muted); text-align: justify; hyphens: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 760px) {
  :root { --white-h: 180px; }
  .vk-pads { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}
@media (max-width: 520px) {
  .navigation-wrap { padding: 0 12px; gap: 12px; }
  .vk-panel, .top-navigation-header, .header-wrap, .footer-wrap { padding: 12px; }
  .main-title { font-size: 2em; }
  .subtitle { font-size: 0.95em; }
  .vk-inst { flex: 1 1 28%; padding: 11px 8px; text-align: center; }
  .vk-row-set { gap: 12px; }
  .vk-pads { grid-template-columns: repeat(3, 1fr); }
  .vk-pad-name { font-size: 11px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  :root { --white-h: 150px; }
  .navigation-wrap { margin: 8px auto; gap: 10px; }
  .top-navigation-header, .header-wrap, .footer-wrap, .vk-credits, .vk-help { display: none; }
  .vk-panel { padding: 10px; }
  .main-content { gap: 10px; }
  .vk-row { padding: 8px; }
  .vk-pads { grid-template-columns: repeat(7, 1fr); }
  .vk-pad { aspect-ratio: auto; min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .main-title, .vk-inst.loading { animation: none; }
  .main-title { -webkit-text-fill-color: var(--primary); color: var(--primary); }
}
