@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* ======================================================
   PERDERELTIEMPO.COM — Shared Styles
   ====================================================== */

:root {
  --green:    #39ff14;
  --pink:     #ff0090;
  --cyan:     #00e5ff;
  --yellow:   #ffe600;
  --bg:       #0a0a0a;
  --surface:  #111111;
  --surface2: #1a1a1a;
  --border:   #2a2a2a;
  --text:     #cccccc;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 10px 16px;
  border: 4px solid currentColor;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.08s, color 0.08s;
  line-height: 1.5;
  border-radius: 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn-green  { color: var(--green); }
.btn-green:hover  { background: var(--green);  color: var(--bg); }

.btn-pink   { color: var(--pink); }
.btn-pink:hover   { background: var(--pink);   color: var(--bg); }

.btn-cyan   { color: var(--cyan); }
.btn-cyan:hover   { background: var(--cyan);   color: var(--bg); }

.btn-yellow { color: var(--yellow); }
.btn-yellow:hover { background: var(--yellow); color: var(--bg); }

/* ── Navbar ──────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 4px solid var(--green);
  box-shadow: 0 4px 0 rgba(57, 255, 20, 0.15);
}

.navbar-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(8px, 1.8vw, 13px);
  color: var(--green);
  text-decoration: none;
  animation: logo-blink 4s infinite;
  flex-shrink: 0;
}

@keyframes logo-blink {
  0%,  18% { color: var(--green);  text-shadow: 0 0 12px var(--green);  }
  25%, 43% { color: var(--pink);   text-shadow: 0 0 12px var(--pink);   }
  50%, 68% { color: var(--cyan);   text-shadow: 0 0 12px var(--cyan);   }
  75%, 93% { color: var(--yellow); text-shadow: 0 0 12px var(--yellow); }
  100%     { color: var(--green);  text-shadow: 0 0 12px var(--green);  }
}

.navbar-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ── Hero ────────────────────────────────────────────── */

.hero {
  padding: 72px 24px 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* CRT scanlines */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.09) 2px,
    rgba(0, 0, 0, 0.09) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(12px, 2.2vw, 22px);
  color: var(--green);
  line-height: 2.2;
  text-shadow: 0 0 24px rgba(57, 255, 20, 0.4);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cursor {
  display: inline-block;
  width: 14px;
  height: 3px;
  background: var(--green);
  margin-left: 4px;
  vertical-align: middle;
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-decoration {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 20px;
}

.pixel-star {
  width: 8px;
  height: 8px;
  display: inline-block;
  animation: star-pulse 1.8s ease-in-out infinite;
}

@keyframes star-pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.2; transform: scale(0.4); }
}

/* ── Games Section ───────────────────────────────────── */

.games-section {
  padding: 56px 28px 64px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(12px, 1.8vw, 18px);
  color: var(--cyan);
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--cyan);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Game Card ───────────────────────────────────────── */

.game-card {
  background: var(--surface);
  border: 4px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.game-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.18);
  transform: translateY(-2px);
}

.game-thumbnail {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
  border-bottom: 4px solid var(--border);
  background: var(--surface2);
}

.game-card:hover .game-thumbnail {
  border-bottom-color: var(--green);
}

.game-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.game-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--green);
  line-height: 1.8;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 4px 8px;
  border: 2px solid var(--pink);
  color: var(--pink);
}

.game-desc {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.game-card .btn {
  margin-top: 8px;
  text-align: center;
  width: 100%;
}

/* ── Modals ──────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s, visibility 0.18s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg);
  border: 4px solid var(--green);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 0 48px rgba(57, 255, 20, 0.25);
}

.modal-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(13px, 3vw, 17px);
  color: var(--yellow);
  margin-bottom: 18px;
  text-shadow: 0 0 10px rgba(255, 230, 0, 0.35);
  line-height: 1.6;
}

.modal-text {
  font-family: 'VT323', monospace;
  font-size: 21px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-input {
  width: 100%;
  padding: 12px;
  background: var(--surface2);
  border: 4px solid var(--green);
  color: var(--green);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  outline: none;
  margin-bottom: 10px;
  border-radius: 0;
}

.modal-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

.modal-input::placeholder { color: #444; }

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-error {
  font-family: 'VT323', monospace;
  font-size: 19px;
  color: var(--pink);
  margin-bottom: 8px;
  display: none;
}
.modal-error.show { display: block; }

/* ── Footer ──────────────────────────────────────────── */

footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 4px solid var(--border);
  padding: 32px 28px;
  text-align: center;
}

.footer-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #666;
  margin-bottom: 16px;
  line-height: 2;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.footer-links a {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #555;
  text-decoration: none;
  transition: color 0.1s;
}
.footer-links a:hover { color: var(--green); }
.footer-links .sep   { color: var(--border); }

/* ── Contact Page ────────────────────────────────────── */

.contact-page {
  padding: 56px 28px 64px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.form-group { margin-bottom: 24px; }

.form-label {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--cyan);
  margin-bottom: 10px;
  line-height: 1.8;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px;
  background: var(--surface2);
  border: 4px solid var(--border);
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: 20px;
  outline: none;
  transition: border-color 0.15s;
  border-radius: 0;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.form-textarea { min-height: 120px; }

.form-error {
  font-family: 'VT323', monospace;
  font-size: 19px;
  color: var(--pink);
  margin-bottom: 12px;
  display: none;
}
.form-error.show { display: block; }

.contact-success {
  display: none;
  text-align: center;
  padding: 40px 24px;
  border: 4px solid var(--green);
  margin-top: 24px;
}
.contact-success.show { display: block; }

.contact-success-text {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(11px, 2.5vw, 14px);
  color: var(--green);
  line-height: 2.5;
  text-shadow: 0 0 12px rgba(57, 255, 20, 0.4);
  animation: pulse-glow 1.5s ease-in-out infinite;
}

/* ── Game Pages ──────────────────────────────────────── */

.game-section {
  padding: 48px 28px 64px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(11px, 1.8vw, 16px);
  color: var(--yellow);
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--yellow);
  width: 100%;
  text-align: left;
}

/* ── Shared Animations ───────────────────────────────── */

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

@keyframes float-up {
  0%   { opacity: 1; transform: translateY(0) scale(1);   }
  100% { opacity: 0; transform: translateY(-70px) scale(0.6); }
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 600px) {
  .navbar { padding: 12px 16px; }
  .navbar-logo { font-size: 8px; }
  .navbar-links { gap: 8px; }
  .btn { font-size: 8px; padding: 8px 10px; }
  .hero { padding: 48px 16px 36px; }
  .games-section, .contact-page { padding: 40px 16px 48px; }
  .games-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px 16px; }
  .modal-title { font-size: 12px; }
}
