﻿/* ==========================================================================
   organizador-arquivos.css — Organizador de Arquivos Express (Pratique Grátis F5)
   Design System Oficial F5 com tema neon, esteira dinâmica, 5 pastas corporativas
   ========================================================================== */

:root {
  --oa-bg: #07111e;
  --oa-surface: #0b1a2d;
  --oa-surface-hover: #10243e;
  --oa-cyan: #38bdf8;
  --oa-cyan-glow: rgba(56, 189, 248, 0.4);
  --oa-yellow: #facc15;
  --oa-yellow-glow: rgba(250, 204, 21, 0.4);
  --oa-green: #4ade80;
  --oa-purple: #c084fc;
  --oa-red: #f87171;
  --oa-text: #f8fafc;
  --oa-text-muted: #94a3b8;
  --oa-font: 'Barlow', -apple-system, sans-serif;
  --oa-font-cond: 'Barlow Condensed', sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--oa-bg);
  font-family: var(--oa-font);
  color: var(--oa-text);
  user-select: none;
  -webkit-user-select: none;
}

.oa-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  position: relative;
  background: radial-gradient(circle at 50% 15%, #0e223d 0%, #06101d 100%);
}

/* ── Topbar ── */
.oa-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.2rem;
  background: rgba(7, 17, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  z-index: 20;
}

.oa-back-btn {
  color: var(--oa-cyan);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.2s ease;
}
.oa-back-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  transform: translateX(-2px);
}

.oa-top-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.oa-top-title span:first-child {
  font-family: var(--oa-font-cond);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}
.oa-top-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--oa-yellow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oa-top-controls {
  display: flex;
  gap: 0.5rem;
}
.oa-btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--oa-text-muted);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.oa-btn-icon:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--oa-cyan);
  border-color: rgba(56, 189, 248, 0.4);
}
.oa-btn-icon svg { width: 18px; height: 18px; }

/* ── Palco Principal ── */
.oa-main-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.8rem 1.2rem 1.2rem;
  overflow: hidden;
}

/* ── HUD ── */
.oa-hud-layer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
}
.oa-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.oa-stat-box {
  background: rgba(11, 26, 45, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 0.35rem 0.8rem;
  display: flex;
  flex-direction: column;
  min-width: 80px;
  backdrop-filter: blur(8px);
}
.oa-stat-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--oa-text-muted);
  letter-spacing: 0.05em;
}
.oa-stat-val {
  font-family: var(--oa-font-cond);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.oa-stat-val.gold { color: var(--oa-yellow); text-shadow: 0 0 10px var(--oa-yellow-glow); }
.oa-stat-val.cyan { color: var(--oa-cyan); }

.oa-lives-box {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}
.oa-heart {
  font-size: 1rem;
  transition: transform 0.2s, filter 0.2s;
}
.oa-heart.lost {
  filter: grayscale(1) opacity(0.35);
  transform: scale(0.85);
}

.oa-biome-indicator {
  font-family: var(--oa-font-cond);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #fff;
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.oa-hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.oa-combo-badge {
  font-family: var(--oa-font-cond);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--oa-yellow);
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.oa-speedo-box {
  background: rgba(11, 26, 45, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 0.35rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ── Barra de Tempo da Esteira ── */
.oa-timer-bar-wrap {
  width: 100%;
  max-width: 480px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  margin: 0.4rem auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}
.oa-timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--oa-cyan), var(--oa-yellow));
  border-radius: 99px;
  transition: width 0.1s linear, background-color 0.3s;
}
.oa-timer-bar-wrap.danger .oa-timer-bar-fill {
  background: var(--oa-red);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.7);
}

/* ── Zona Central: Card do Arquivo em Queda/Esteira ── */
.oa-conveyor-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 180px;
}

.oa-file-card {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(145deg, #132a48 0%, #0a1b30 100%);
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 20px;
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(56, 189, 248, 0.2);
  cursor: grab;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  touch-action: none;
  animation: filePop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.oa-file-card:active {
  cursor: grabbing;
  transform: scale(0.96);
}
@keyframes filePop {
  0% { transform: scale(0.7) translateY(-30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.oa-file-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--oa-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.oa-file-icon {
  font-size: 3.2rem;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.oa-file-name {
  font-family: var(--oa-font-cond);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  word-break: break-all;
  margin-bottom: 0.4rem;
}

.oa-file-ext-tag {
  font-family: var(--oa-font-cond);
  font-size: 1.15rem;
  font-weight: 900;
  color: #07111e;
  background: var(--oa-yellow);
  padding: 0.18rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
  box-shadow: 0 0 14px var(--oa-yellow-glow);
}

.oa-file-drag-hint {
  font-size: 0.72rem;
  color: var(--oa-text-muted);
  font-weight: 600;
}

/* ── Zona Inferior: As 5 Pastas de Destino ── */
.oa-folders-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 0.8rem;
  z-index: 10;
}

.oa-folder-box {
  background: linear-gradient(145deg, #0f243e 0%, #081628 100%);
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}
.oa-folder-box:hover {
  transform: translateY(-4px);
  border-color: var(--oa-cyan);
  background: linear-gradient(145deg, #16365c 0%, #0d223d 100%);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4), 0 0 20px rgba(56, 189, 248, 0.25);
}
.oa-folder-box:active {
  transform: scale(0.95);
}

.oa-folder-box.drag-over {
  border-color: var(--oa-yellow);
  border-style: solid;
  transform: scale(1.05);
  background: rgba(250, 204, 21, 0.15);
  box-shadow: 0 0 30px var(--oa-yellow-glow);
}

.oa-folder-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--oa-cyan);
  color: #07111e;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 0 10px var(--oa-cyan-glow);
}

.oa-folder-icon {
  font-size: 2.3rem;
  margin-bottom: 0.35rem;
  transition: transform 0.2s ease;
}
.oa-folder-box:hover .oa-folder-icon {
  transform: scale(1.15);
}

.oa-folder-title {
  font-family: var(--oa-font-cond);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
}

/* Feedback de acerto e erro nas pastas */
.oa-folder-box.success {
  border-color: var(--oa-green) !important;
  border-style: solid;
  background: rgba(74, 222, 128, 0.2) !important;
  animation: folderPulse 0.4s ease;
}
.oa-folder-box.error {
  border-color: var(--oa-red) !important;
  border-style: solid;
  background: rgba(248, 113, 113, 0.2) !important;
  animation: folderShake 0.4s ease;
}
@keyframes folderPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes folderShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ── Modais e Overlays ── */
.oa-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 19, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}
.oa-overlay.hidden { display: none !important; }

.oa-card {
  background: linear-gradient(145deg, #0e223d 0%, #081628 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(56, 189, 248, 0.2);
}

.oa-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a5f, #0d2038);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: grid;
  place-items: center;
  margin: 0 auto 0.6rem;
  box-shadow: 0 0 20px var(--oa-cyan-glow);
  font-size: 1.6rem;
}

.oa-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oa-cyan);
  margin-bottom: 0.2rem;
  display: inline-block;
}

.oa-title {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.4rem;
  color: #fff;
}
.oa-title span { color: var(--oa-yellow); }

.oa-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--oa-text-muted);
  margin-bottom: 1.1rem;
}

.oa-instructions {
  background: rgba(7, 17, 31, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 1.2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.oa-instruction-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #d1e8ff;
}
.oa-inst-icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--oa-cyan);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.oa-btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  background: linear-gradient(135deg, #fde047 0%, #facc15 50%, #eab308 100%);
  color: #08111e;
  border: 1px solid rgba(254, 240, 138, 0.6);
  border-radius: 12px;
  font-family: var(--oa-font);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.oa-btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(250, 204, 21, 0.5);
}

.oa-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}
.oa-btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 42px;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.oa-btn-share:hover { background: #16a34a; }
.oa-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--oa-text);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.oa-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--oa-cyan);
}

.oa-gameover-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}
.oa-go-stat {
  background: rgba(7, 17, 31, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.6rem;
  text-align: center;
}
.oa-go-label {
  font-size: 0.62rem;
  color: var(--oa-text-muted);
  font-weight: 700;
  text-transform: uppercase;
}
.oa-go-val {
  font-family: var(--oa-font-cond);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.oa-go-val.highlight { color: var(--oa-yellow); }

.oa-record-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid var(--oa-yellow);
  color: var(--oa-yellow);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* ── Toast ── */
.oa-toast {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(14, 34, 61, 0.95);
  border: 1px solid var(--oa-cyan);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--oa-cyan-glow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
}
.oa-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsivo Mobile ── */
@media (max-width: 768px) {
  .oa-folders-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .oa-folder-box {
    padding: 0.7rem 0.4rem;
  }
  .oa-folder-icon {
    font-size: 1.8rem;
  }
  .oa-folder-title {
    font-size: 0.88rem;
  }
  .oa-file-card {
    padding: 1rem 0.8rem;
    max-width: 270px;
  }
  .oa-file-icon {
    font-size: 2.5rem;
  }
  .oa-file-name {
    font-size: 1.15rem;
  }
}
@media (max-width: 480px) {
  .oa-folders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
