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

:root {
  --bg-color: #121024;
  --bg-card: #1b1633;
  --bg-card-light: #261f47;
  --text-main: #f0f4f8;
  --text-dim: #94a3b8;
  --retro-yellow: #facc15;
  --retro-gold: #f59e0b;
  --retro-pink: #ec4899;
  --retro-purple: #8b5cf6;
  --retro-cyan: #06b6d4;
  --retro-green: #22c55e;
  --retro-red: #ef4444;
  --retro-border: #f8fafc;
  --pixel-shadow: 4px 4px 0px #000000;
  --pixel-shadow-sm: 2px 2px 0px #000000;
  --pixel-shadow-lg: 6px 6px 0px #000000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  image-rendering: pixelated;
}

body {
  font-family: 'Press Start 2P', monospace;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 12px;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Scanline Effect */
body::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 36, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 999;
  pointer-events: none;
  opacity: 0.6;
}

/* Container */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

/* Pixel Typography */
h1, h2, h3, h4 {
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 1px;
  line-height: 1.4;
  text-shadow: 2px 2px 0px #000;
}

h1 { font-size: 20px; color: var(--retro-yellow); }
h2 { font-size: 16px; color: var(--retro-cyan); }
h3 { font-size: 13px; color: var(--retro-pink); }
h4 { font-size: 11px; }

p, li, span, label {
  font-size: 11px;
  line-height: 1.7;
}

.text-sub {
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1.4;
}

/* Pixel Card & Box */
.pixel-box {
  background: var(--bg-card);
  border: 4px solid var(--retro-border);
  box-shadow: var(--pixel-shadow);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

.pixel-box-gold {
  border-color: var(--retro-yellow);
  box-shadow: 4px 4px 0px #92400e;
}

.pixel-box-pink {
  border-color: var(--retro-pink);
  box-shadow: 4px 4px 0px #831843;
}

.pixel-box-cyan {
  border-color: var(--retro-cyan);
  box-shadow: 4px 4px 0px #0e7490;
}

.pixel-box-green {
  border-color: var(--retro-green);
  box-shadow: 4px 4px 0px #14532d;
}

/* Pixel Buttons */
.pixel-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 12px 18px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid #000;
  box-shadow: var(--pixel-shadow);
  background: var(--retro-yellow);
  color: #000;
  text-transform: uppercase;
  transition: all 0.1s ease;
  user-select: none;
  touch-action: manipulation;
  gap: 8px;
  text-align: center;
}

.pixel-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

.pixel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000;
}

.pixel-btn-pink {
  background: var(--retro-pink);
  color: #fff;
}

.pixel-btn-cyan {
  background: var(--retro-cyan);
  color: #000;
}

.pixel-btn-green {
  background: var(--retro-green);
  color: #000;
}

.pixel-btn-red {
  background: var(--retro-red);
  color: #fff;
}

.pixel-btn-dark {
  background: #334155;
  color: #fff;
  border-color: #000;
}

.pixel-btn-block {
  display: flex;
  width: 100%;
}

/* Form Controls */
.pixel-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.pixel-form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--retro-yellow);
  font-size: 10px;
}

.grid-2 > .pixel-form-group {
  display: flex;
  flex-direction: column;
}

.grid-2 > .pixel-form-group > label {
  min-height: 22px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 8px;
}

.pixel-input, .pixel-select, .pixel-textarea {
  width: 100%;
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 10px 12px;
  background: #090714;
  color: #fff;
  border: 3px solid var(--retro-border);
  box-shadow: inset 2px 2px 0px #000;
  outline: none;
  border-radius: 0;
}

.pixel-input:focus, .pixel-select:focus, .pixel-textarea:focus {
  border-color: var(--retro-yellow);
  box-shadow: inset 2px 2px 0px #000, 0 0 8px rgba(250, 204, 21, 0.4);
}

.pixel-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Badges & Tags */
.pixel-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 9px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0px #000;
  text-transform: uppercase;
  font-weight: bold;
}

.pixel-badge-active {
  background: var(--retro-green);
  color: #000;
}

.pixel-badge-inactive {
  background: var(--retro-red);
  color: #fff;
}

.pixel-badge-wedding {
  background: var(--retro-pink);
  color: #fff;
}

.pixel-badge-birthday {
  background: var(--retro-cyan);
  color: #000;
}

/* Table */
.pixel-table-wrapper {
  overflow-x: auto;
  margin-top: 15px;
}

.pixel-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 10px;
}

.pixel-table th, .pixel-table td {
  padding: 10px;
  border: 2px solid #334155;
}

.pixel-table th {
  background: #0f172a;
  color: var(--retro-yellow);
}

.pixel-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

/* Navigation Bar */
.retro-nav {
  background: #0b0918;
  border-bottom: 4px solid var(--retro-yellow);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.retro-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--retro-yellow);
  text-decoration: none;
  font-size: 12px;
}

.retro-logo .icon {
  font-size: 18px;
}

/* Audio Player Widget */
.retro-audio-widget {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000;
  border: 3px solid var(--retro-yellow);
  padding: 6px 12px;
  box-shadow: var(--pixel-shadow);
}

.retro-audio-widget button {
  background: none;
  border: none;
  color: var(--retro-yellow);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  cursor: pointer;
  padding: 4px;
}

/* Countdown Display */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.countdown-box {
  background: #000;
  border: 3px solid var(--retro-cyan);
  padding: 10px 14px;
  text-align: center;
  min-width: 65px;
  box-shadow: 3px 3px 0px #0e7490;
}

.countdown-num {
  font-size: 18px;
  color: var(--retro-yellow);
  display: block;
}

.countdown-label {
  font-size: 8px;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

/* Retro Modal */
.pixel-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 16px;
}

.pixel-modal-backdrop.show {
  display: flex;
}

.pixel-modal-content {
  background: var(--bg-card);
  border: 4px solid var(--retro-yellow);
  box-shadow: var(--pixel-shadow-lg);
  max-width: 500px;
  width: 100%;
  padding: 24px;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* Animations */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.pixel-blink {
  animation: blink 1s infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.pixel-float {
  animation: float 2s ease-in-out infinite;
}
