/* Radyo Modyan Arşiv — Win95 teması. Marka kırmızısı: #ed1c24 */

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

[hidden] { display: none !important; }

:root {
  --teal: #008080;
  --gray: #c0c0c0;
  --gray-dark: #808080;
  --gray-darker: #404040;
  --red: #ed1c24;
  --red-dark: #7a0e12;
  --lcd-green: #00e800;
}

html, body { height: 100%; }

body {
  font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  font-size: 12px;
  background: var(--teal);
  overflow: hidden;
  -webkit-font-smoothing: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- Bevel yardımcıları ---------- */
.win95-window, .winamp {
  position: fixed;
  background: var(--gray);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--gray-dark),
              2px 2px 0 rgba(0,0,0,.35);
}

.sunken, .tree-pane, .file-pane {
  background: #fff;
  box-shadow: inset 1px 1px 0 var(--gray-darker), inset -1px -1px 0 #fff,
              inset 2px 2px 0 var(--gray-dark);
}

/* ---------- Masaüstü ikonu ---------- */
#desktop { position: fixed; inset: 0; padding: 24px; }

.desk-icon {
  width: 84px;
  text-align: center;
  cursor: default;
  outline: none;
}

.desk-icon-img, .empty-folder-img {
  width: 48px; height: 40px;
  margin: 0 auto 4px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20' shape-rendering='crispEdges'%3E%3Crect x='1' y='5' width='22' height='13' fill='%23f5d76a'/%3E%3Crect x='1' y='3' width='10' height='4' fill='%23f5d76a'/%3E%3Cpath d='M1 3h10v1H1zM1 18h22v1H1zM0 4v14h1V4zM23 5v13h1V5zM11 4h12v1H11z' fill='%23000'/%3E%3Crect x='2' y='6' width='20' height='2' fill='%23fdeeb3'/%3E%3C/svg%3E");
  image-rendering: pixelated;
}

.desk-icon-label {
  display: inline-block;
  color: #fff;
  padding: 1px 4px;
}

.desk-icon:focus .desk-icon-label,
.desk-icon.selected .desk-icon-label {
  background: #000080;
  outline: 1px dotted #fff;
}

/* ---------- Pencere ---------- */
.win95-window {
  left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  padding: 3px;
}

.title-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  color: #fff;
  font-weight: bold;
  padding: 2px 3px 2px 6px;
  cursor: default;
  touch-action: none;
}

.title-bar-text { flex: 1; white-space: nowrap; overflow: hidden; }

.title-bar-icon {
  width: 14px; height: 12px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20' shape-rendering='crispEdges'%3E%3Crect x='1' y='5' width='22' height='13' fill='%23f5d76a'/%3E%3Crect x='1' y='3' width='10' height='4' fill='%23f5d76a'/%3E%3C/svg%3E");
}

.title-btn, .winamp-close {
  width: 18px; height: 16px;
  font-size: 11px; line-height: 1;
  background: var(--gray);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--gray-dark);
  cursor: pointer;
  font-family: inherit;
}

.title-btn:active, .winamp-close:active,
.winamp-controls button:active {
  box-shadow: inset 1px 1px 0 var(--gray-dark), inset -1px -1px 0 #fff;
}

/* ---------- Explorer gövde ---------- */
.explorer-body {
  flex: 1;
  display: flex;
  gap: 3px;
  padding: 3px 0;
  min-height: 0;
}

.tree-pane {
  width: 240px;
  overflow: auto;
  padding: 4px;
  flex-shrink: 0;
}

.file-pane {
  flex: 1;
  overflow: auto;
  padding: 10px;
  position: relative;
}

/* Ağaç */
.tree-pane ul { list-style: none; padding-left: 18px; }
.tree-pane > ul { padding-left: 2px; }

.tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 1px 2px;
  cursor: default;
}

.tree-row.selected .tree-label { background: #000080; color: #fff; }

.tree-toggle {
  width: 11px; height: 11px;
  flex-shrink: 0;
  border: 1px solid var(--gray-dark);
  background: #fff;
  font-size: 9px; line-height: 9px;
  text-align: center;
  cursor: pointer;
}
.tree-toggle.leaf { visibility: hidden; }

.mini-folder {
  width: 16px; height: 13px;
  flex-shrink: 0;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20' shape-rendering='crispEdges'%3E%3Crect x='1' y='5' width='22' height='13' fill='%23f5d76a' stroke='%23000'/%3E%3Crect x='1' y='3' width='10' height='4' fill='%23f5d76a' stroke='%23000'/%3E%3C/svg%3E");
  image-rendering: pixelated;
}

.tree-label { padding: 0 3px; }

/* Dosya paneli */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px 4px;
  align-content: start;
}

.file-icon {
  text-align: center;
  cursor: default;
  padding: 2px;
  overflow-wrap: anywhere;
}

.file-icon.selected .file-icon-label { background: #000080; color: #fff; }

.file-icon-img {
  width: 34px; height: 34px;
  margin: 0 auto 3px;
  background: no-repeat center / contain;
  image-rendering: pixelated;
}

.file-icon-img.folder {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20' shape-rendering='crispEdges'%3E%3Crect x='1' y='5' width='22' height='13' fill='%23f5d76a'/%3E%3Crect x='1' y='3' width='10' height='4' fill='%23f5d76a'/%3E%3Cpath d='M1 3h10v1H1zM1 18h22v1H1zM0 4v14h1V4zM23 5v13h1V5zM11 4h12v1H11z' fill='%23000'/%3E%3C/svg%3E");
}

.file-icon-img.mp3 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24' shape-rendering='crispEdges'%3E%3Cpath d='M2 1h11l5 5v17H2z' fill='%23fff' stroke='%23000'/%3E%3Cpath d='M13 1v5h5' fill='none' stroke='%23000'/%3E%3Cpath d='M8 8h6v2h-4v7' fill='none' stroke='%23ed1c24' stroke-width='1.6'/%3E%3Ccircle cx='7' cy='17' r='2.4' fill='%23ed1c24'/%3E%3Ccircle cx='13' cy='16' r='2' fill='%23ed1c24'/%3E%3C/svg%3E");
}

.file-icon-label { display: inline-block; padding: 0 2px; font-size: 11px; }

/* Yağmur animasyonu */
@keyframes fileDrop {
  from { transform: translateY(-28px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.file-icon.drop { animation: fileDrop .28s cubic-bezier(.2,.7,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  .file-icon.drop { animation: none; }
  .lcd-track span { animation: none !important; }
}

/* Boş durum */
.empty-state {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-dark);
}
.empty-folder-img { opacity: .45; width: 64px; height: 54px; }

/* Durum çubuğu */
.status-bar {
  padding: 3px 8px;
  box-shadow: inset 1px 1px 0 var(--gray-dark), inset -1px -1px 0 #fff;
  white-space: nowrap;
  overflow: hidden;
}

/* ---------- Winamp ---------- */
.winamp {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, calc(100vw - 20px));
  background: repeating-linear-gradient(0deg, #3a3a44 0 2px, #2c2c34 2px 4px);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #6a6a78, inset -1px -1px 0 #14141a,
              3px 3px 0 rgba(0,0,0,.4);
  padding: 4px 6px 8px;
  z-index: 60;
}

.winamp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d6d6e0;
  font-size: 9px;
  letter-spacing: 2px;
  padding: 2px 2px 4px;
  cursor: default;
  touch-action: none;
}

.winamp-close { width: 14px; height: 13px; font-size: 9px; }

.winamp-lcd {
  background: #0a0a0a;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #4a4a55;
  padding: 5px 7px;
  margin-bottom: 6px;
}

.lcd-track {
  color: var(--lcd-green);
  font: bold 11px "Courier New", monospace;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 4px;
}

.lcd-track span { display: inline-block; padding-left: 0; }
.lcd-track span.scroll { animation: marquee 9s linear infinite; }
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.lcd-row { display: flex; align-items: center; justify-content: space-between; }

.lcd-time {
  color: var(--red);
  font: bold 15px "Courier New", monospace;
  letter-spacing: 2px;
}

#spectrum { image-rendering: pixelated; }

.seek {
  width: 100%;
  margin: 2px 0 6px;
  appearance: none;
  -webkit-appearance: none;
  height: 10px;
  background: #1c1c22;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #000;
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 10px;
  background: linear-gradient(180deg, #ff5b60, var(--red) 55%, var(--red-dark));
  border: 1px solid #000;
  cursor: pointer;
}
.seek::-moz-range-thumb {
  width: 26px; height: 10px;
  background: linear-gradient(180deg, #ff5b60, var(--red) 55%, var(--red-dark));
  border: 1px solid #000;
  border-radius: 0;
  cursor: pointer;
}

.winamp-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.winamp-controls button {
  flex: 1;
  height: 22px;
  font-size: 11px;
  background: var(--gray);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--gray-dark);
  cursor: pointer;
  font-family: inherit;
}

.winamp-download {
  flex: 1.2;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ff5b60, var(--red) 55%, var(--red-dark));
  color: #fff;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 1px;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #ff9a9d, inset -1px -1px 0 var(--red-dark);
  text-decoration: none;
  cursor: pointer;
}

/* ---------- Mobil ---------- */
@media (max-width: 700px) {
  .win95-window {
    left: 0; top: 0;
    transform: none;
    width: 100vw;
    height: 100%;
  }
  .explorer-body { flex-direction: column; }
  .tree-pane { width: auto; max-height: 38vh; }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
