/* ========================================================
   BRYK VIRUS - STYLING (ptoszek.pl style troll site)
   ======================================================== */

:root {
  --bg-color: #0b0c10;
  --matrix-green: #00ff66;
  --alert-red: #ff0055;
  --hazard-yellow: #ffee00;
  --neon-blue: #00e5ff;
  --win-blue-start: #0055ea;
  --win-blue-end: #0a246a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
}

/* Background canvas for matrix / glitch rain */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
}

/* CRT Scanlines Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.4) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 4px, 6px 100%;
  z-index: 900;
  pointer-events: none;
}

/* Screen Shake Animations */
body.shake-screen {
  animation: screenWobble 0.25s infinite alternate ease-in-out;
}

@keyframes screenWobble {
  0% { transform: translate(-4px, 3px) rotate(-0.5deg); }
  50% { transform: translate(5px, -3px) rotate(0.5deg); }
  100% { transform: translate(-3px, -4px) rotate(0.2deg); }
}

body.flash-red {
  animation: redFlash 0.3s infinite alternate;
}

@keyframes redFlash {
  0% { filter: invert(0); }
  100% { filter: invert(0.2) hue-rotate(320deg); }
}

/* Top Marquee Hazard Banner */
.hazard-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: repeating-linear-gradient(
    45deg,
    #000,
    #000 20px,
    #ffee00 20px,
    #ffee00 40px
  );
  color: #000;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 2px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 2px solid #fff;
}

.hazard-marquee {
  display: flex;
  white-space: nowrap;
  animation: marqueeScroll 15s linear infinite;
  background: #ffcc00;
  padding: 4px 0;
  width: 200%;
  font-family: monospace;
  font-size: 14px;
  font-weight: 900;
  color: #000;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Top Status Dashboard */
.top-dashboard {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 15px;
  align-items: center;
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
  padding: 8px 18px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
}

.dash-badge {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-badge.danger {
  color: var(--alert-red);
}

.dash-badge.warning {
  color: var(--hazard-yellow);
}

.dash-badge.success {
  color: var(--matrix-green);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--alert-red);
  box-shadow: 0 0 10px var(--alert-red);
  animation: pulseLight 0.5s infinite alternate;
}

@keyframes pulseLight {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* Control Buttons (Sound, Safe Mode, Runaway) */
.ctrl-btn {
  background: #222;
  border: 1px solid #555;
  color: #fff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ctrl-btn:hover {
  background: #ff0055;
  border-color: #fff;
  box-shadow: 0 0 10px #ff0055;
}

/* Floating / Bouncing Bryk Elements */
.bouncing-bryk {
  position: fixed;
  z-index: 500;
  cursor: pointer;
  will-change: transform, left, top;
  filter: drop-shadow(0 0 35px rgba(255, 0, 85, 0.95)) drop-shadow(0 0 70px rgba(255, 238, 0, 0.8)) drop-shadow(0 0 110px rgba(0, 229, 255, 0.7));
  transition: filter 0.15s;
}

.bouncing-bryk img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  border-radius: 20px;
}

.bouncing-bryk:hover {
  filter: drop-shadow(0 0 50px #00ff66) drop-shadow(0 0 100px #fff);
  transform: scale(1.05);
}

/* Ghost Trail for flying Bryk */
.bryk-trail {
  position: fixed;
  pointer-events: none;
  z-index: 490;
  opacity: 0.6;
  border-radius: 16px;
  animation: fadeOutTrail 0.4s forwards linear;
}

@keyframes fadeOutTrail {
  0% { opacity: 0.7; transform: scale(1); filter: hue-rotate(0deg); }
  100% { opacity: 0; transform: scale(1.3); filter: hue-rotate(180deg); }
}

/* Retro Windows XP / 98 Floating Popups */
.win-modal {
  position: fixed;
  width: 380px;
  max-width: 90vw;
  background: #ece9d8;
  border: 3px solid #0055ea;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 6px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 85, 234, 0.5);
  z-index: 600;
  font-family: 'Tahoma', 'Segoe UI', sans-serif;
  color: #000;
  user-select: none;
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.win-titlebar {
  background: linear-gradient(180deg, #0a246a 0%, #0055ea 30%, #0055ea 70%, #0a246a 100%);
  color: #fff;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 5px 5px 0 0;
  cursor: move;
  text-shadow: 1px 1px 1px #000;
}

.win-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-title-icon {
  font-size: 14px;
}

.win-buttons {
  display: flex;
  gap: 3px;
}

.win-btn-close {
  background: linear-gradient(180deg, #e06c55, #c73922);
  border: 1px solid #fff;
  border-radius: 3px;
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-btn-close:hover {
  background: #ff0000;
}

.win-body {
  padding: 16px 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f0ede0;
}

.win-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: #fff;
  border: 2px solid #cc0000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.win-message {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: #111;
}

.win-message strong {
  color: #cc0000;
  display: block;
  margin-bottom: 3px;
}

.win-footer {
  background: #ece9d8;
  padding: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #d4d0c8;
}

.win-action-btn {
  background: #ece9d8;
  border: 2px outset #ffffff;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.win-action-btn:active {
  border-style: inset;
}

.win-action-btn.primary {
  border-color: #0055ea;
  background: #d8e5ff;
}

/* Downloads Manager Dock */
.downloads-dock {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 360px;
  max-width: 90vw;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #00ff66;
  box-shadow: 0 0 25px rgba(0, 255, 102, 0.4);
  border-radius: 12px;
  z-index: 800;
  overflow: hidden;
  font-family: monospace;
}

.dock-header {
  background: #003311;
  color: #00ff66;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #00ff66;
}

.dock-body {
  padding: 10px 12px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 11px;
}

.download-item {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #334433;
}

.download-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.dl-filename {
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

.dl-status {
  color: #00ff66;
  font-weight: bold;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #112211;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid #00aa44;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff66, #ffee00, #ff0055);
  width: 0%;
  transition: width 0.3s ease;
}

.dock-footer {
  padding: 8px 12px;
  background: #0d1a10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #88cc88;
  border-top: 1px solid #004411;
}

.force-dl-btn {
  background: #00aa44;
  border: none;
  color: #000;
  font-weight: 900;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.force-dl-btn:hover {
  background: #00ff66;
}

/* Runaway Panic Button */
#runaway-btn {
  position: fixed;
  z-index: 700;
  background: #ff0000;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  padding: 10px 18px;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
  cursor: pointer;
  transition: left 0.15s ease-out, top 0.15s ease-out;
}

/* Initial Bait Screen (Explosive Entry) */
.bait-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.94);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  cursor: pointer;
}

.bait-box {
  background: #111;
  border: 3px solid #ff0055;
  box-shadow: 0 0 50px rgba(255, 0, 85, 0.5);
  border-radius: 18px;
  padding: 35px 25px;
  max-width: 520px;
  width: 100%;
  animation: baitPulse 1.5s infinite alternate;
}

@keyframes baitPulse {
  0% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 0, 85, 0.4); }
  100% { transform: scale(1.02); box-shadow: 0 0 60px rgba(255, 238, 0, 0.7); }
}

.bait-warning-badge {
  display: inline-block;
  background: #ffee00;
  color: #000;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.bait-title {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 2px 2px #ff0055;
}

.bait-desc {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 25px;
  line-height: 1.6;
}

.bait-enter-btn {
  background: linear-gradient(135deg, #ff0055, #ff5500);
  color: #fff;
  border: 3px solid #fff;
  padding: 16px 36px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  border-radius: 35px;
  cursor: pointer;
  box-shadow: 0 0 25px #ff0055;
  animation: enterPulse 0.6s infinite alternate;
  text-transform: uppercase;
}

@keyframes enterPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.bait-subtext {
  margin-top: 15px;
  font-size: 12px;
  color: #888;
}

/* Tribute Link Footer */
.memorial-link {
  position: fixed;
  bottom: 10px;
  left: 15px;
  z-index: 1000;
  font-size: 11px;
  color: #777;
  text-decoration: none;
  background: rgba(0,0,0,0.6);
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid #333;
}

.memorial-link:hover {
  color: #fff;
  border-color: #00e5ff;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .top-dashboard {
    top: 36px;
    width: 95%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
  }
  .downloads-dock {
    width: 92%;
    right: 4%;
    bottom: 10px;
  }
}
