/* style.css - Truth Or Dare Game styles */

:root {
  --bg-color: #0b0c10;
  --panel-bg: rgba(31, 40, 51, 0.8);
  --text-main: #c5c6c7;
  --text-bright: #ffffff;
  --primary: #66fcf1;
  --secondary: #45a29e;
  --accent-pink: #ff007f;
  --accent-purple: #9d00ff;
  --card-radius: 16px;
  --btn-radius: 30px;
  --glow: 0 0 15px rgba(102, 252, 241, 0.5);
  --font-main: 'Outfit', sans-serif;
  --font-bold: 'Poppins', sans-serif;
}

body.light-mode {
  --bg-color: #f0f2f5;
  --panel-bg: rgba(255, 255, 255, 0.9);
  --text-main: #333;
  --text-bright: #111;
  --primary: #007bff;
  --glow: 0 4px 10px rgba(0,0,0,0.1);
}

body.neon-mode {
  --bg-color: #050510;
  --panel-bg: rgba(10, 10, 30, 0.85);
  --text-main: #e6e6e6;
  --text-bright: #fff;
  --primary: #00ffff;
  --secondary: #ff00ff;
  --accent-pink: #ff0066;
  --accent-purple: #8800ff;
  --glow: 0 0 20px rgba(0, 255, 255, 0.6), 0 0 30px rgba(255, 0, 255, 0.4);
}

body.neon-mode::before {
  animation: pulseBg 5s infinite alternate; 
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Background Gradients (Gen-Z Vibe) */
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(157, 0, 255, 0.15), transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(255, 0, 127, 0.15), transparent 50%);
  z-index: -1;
  animation: pulseBg 10s infinite alternate;
}

@keyframes pulseBg {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Typography & Layout */
h1, h2, h3 { font-family: var(--font-bold); color: var(--text-bright); }
.hidden { display: none !important; }

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}
.logo h1 { font-size: 1.8rem; letter-spacing: 1px; }
.logo span { color: var(--primary); text-shadow: var(--glow); }
.navbar nav { display: flex; gap: 1.5rem; align-items: center; }
.navbar a { color: var(--text-main); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.navbar a:hover { color: var(--primary); text-shadow: var(--glow); }
.icon-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

/* Main Containers */
.game-container {
  width: 100%; max-width: 800px;
  margin: 2rem auto; padding: 0 1rem;
  flex: 1; display: flex; flex-direction: column; gap: 2rem;
}

.panel {
  background: var(--panel-bg);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Inputs & Buttons */
.input-group { display: flex; gap: 1rem; margin: 1.5rem 0; flex-wrap: wrap; }
input[type="text"] {
  flex: 1; padding: 1rem 1.5rem;
  border-radius: var(--btn-radius);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2); color: var(--text-bright);
  font-family: var(--font-main); font-size: 1rem; outline: none;
}
input[type="text"]:focus { border-color: var(--primary); box-shadow: var(--glow); }

.btn {
  padding: 1rem 2rem;
  border-radius: var(--btn-radius); border: none;
  font-family: var(--font-bold); font-size: 1rem;
  cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  color: #fff;
}
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.primary-btn { background: var(--secondary); }
.primary-btn:hover { background: var(--primary); color: #000; box-shadow: var(--glow); }

.neon-btn {
  background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
  box-shadow: 0 4px 15px rgba(255, 0, 127, 0.4);
  width: 100%; margin-top: 2rem; font-size: 1.2rem;
}
.neon-btn:hover { box-shadow: 0 4px 25px rgba(255, 0, 127, 0.7); filter: brightness(1.2); }

.spin-btn { background: #ffcc00; color: #000; font-size: 1.5rem; width: 100%; max-width: 300px; margin: 1rem auto; display: block; border: 3px solid #fff; }
.spin-btn:hover { background: #ffea00; box-shadow: 0 0 20px rgba(255, 204, 0, 0.8); }

.truth-btn { background: var(--accent-purple); flex: 1; }
.dare-btn { background: var(--accent-pink); flex: 1; }
.danger-btn { background: #ff4d4d; flex: 1; }
.success-btn { background: #00e676; flex: 1; }
.danger-btn-small { background: transparent; border: 1px solid #ff4d4d; color: #ff4d4d; padding: 0.5rem 1rem; font-size: 0.8rem; }
.danger-btn-small:hover { background: #ff4d4d; color: #fff; }

.mt-3 { margin-top: 1.5rem; }

/* Player Cards */
.player-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.player-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 1rem;
  display: flex; align-items: center; gap: 0.8rem; position: relative;
  transition: transform 0.2s;
}
.player-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; font-weight: bold; color: #000; font-size: 1.2rem; }
.player-info { flex: 1; overflow: hidden; }
.player-name { font-weight: 600; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-score { font-size: 0.85rem; color: var(--primary); }
.remove-player { position: absolute; top: 5px; right: 5px; background: rgba(255,0,0,0.2); border: none; color: #ff4d4d; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s, background 0.2s; }
.player-card:hover .remove-player { opacity: 1; }
.remove-player:hover { background: #ff4d4d; color: #fff; }

/* Game Area & Wheel */
.game-area { text-align: center; }
.turn-banner h2 { font-size: 2rem; margin-bottom: 2rem; text-shadow: 0 0 10px rgba(255,255,255,0.3); }

.wheel-wrapper {
  position: relative; width: 100%; max-width: 400px; aspect-ratio: 1/1;
  margin: 0 auto 2rem; filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
}
.pointer {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  font-size: 2.5rem; color: #fff; z-index: 10;
  text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}
canvas#wheelCanvas {
  width: 100%; height: 100%; border-radius: 50%;
  border: 4px solid #fff; background: #111;
  transition: transform 4s cubic-bezier(0.1, 0.7, 0.1, 1);
}

/* Modals */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.glass {
  background: var(--panel-bg); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--card-radius); padding: 3rem; text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.5); max-width: 90%; width: 450px;
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalPop { 0% { opacity: 0; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1); } }

.modal h2 { margin-bottom: 0.5rem; font-size: 1.8rem; }
.modal p { margin-bottom: 2rem; font-size: 1.1rem; }
.modal-buttons { display: flex; gap: 1rem; width: 100%; }

/* Prompt Modal Specifics */
.prompt-card { border-top: 5px solid var(--primary); }
.badge { display: inline-block; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; letter-spacing: 1px; margin-bottom: 1.5rem; background: var(--primary); color: #000; }
.badge.truth { background: var(--accent-purple); color: #fff; }
.badge.dare { background: var(--accent-pink); color: #fff; }
.prompt-text { font-size: 1.5rem; margin-bottom: 2.5rem; line-height: 1.4; color: #fff; font-family: var(--font-bold); }

/* Loser Modal Specifics */
.loser-card { border: 4px solid #ff4d4d; box-shadow: 0 0 30px rgba(255, 77, 77, 0.4); }
.neon-text { font-size: 3rem; margin: 1rem 0; color: #fff; text-shadow: 0 0 10px #ff4d4d, 0 0 20px #ff4d4d; }
.punishment-box { background: rgba(255,0,0,0.1); padding: 1.5rem; border-radius: 12px; margin-bottom: 2rem; border: 1px dashed rgba(255, 77, 77, 0.5); }
.punishment-box p { margin: 0; font-size: 1.3rem; margin-top: 0.5rem; color: #ffcccc; font-weight: 600; }

/* Leaderboard Panel in Active Game */
.leaderboard-panel {
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}
.leaderboard-panel h3 { margin-bottom: 1rem; font-size: 1.2rem; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; }
.score-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.score-item { background: rgba(0,0,0,0.3); padding: 10px 15px; border-radius: 8px; display: flex; justify-content: space-between; font-weight: bold; border-left: 3px solid var(--secondary); }
.score-positive { color: #00e676; }
.score-negative { color: #ff4d4d; }

/* Confetti */
#confettiContainer { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 999; }
.confetti { position: absolute; width: 10px; height: 10px; background-color: #f00; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(100vh) rotate(720deg); opacity: 0; } }

/* Hero Section */
.hero-section {
  padding: 3rem 1rem 1rem;
  margin-bottom: 2rem;
}
.hero-section p {
  font-size: 1.2rem;
  margin-top: 1rem;
  color: var(--text-main);
  max-width: 600px;
  margin-inline: auto;
}
.text-center { text-align: center; }

/* Featured Articles Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.article-card {
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
  border-color: var(--primary);
}
.article-content h3 {
  font-size: 1.2rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.article-content p {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* 4-Column Footer */
.site-footer {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}
.footer-col h3 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col a {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 0.8rem;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-col a:hover {
  color: var(--primary);
  transform: translateX(5px);
}
.branding h2 { font-size: 1.8rem; letter-spacing: 1px; margin-bottom: 0.5rem; }
.branding h2 span { color: var(--primary); text-shadow: var(--glow); }
.branding p { color: var(--text-main); margin-bottom: 1rem; }
.copy-notice {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-top: 1.5rem;
}

/* Responsive */
@media(max-width: 600px) {
  .navbar { flex-direction: column; gap: 1rem; text-align: center; }
  .input-group { flex-direction: column; }
  .btn { width: 100%; }
  .modal-buttons { flex-direction: column; }
  .turn-banner h2 { font-size: 1.5rem; }
  .wheel-wrapper { max-width: 320px; }
  .glass { padding: 2rem 1.5rem; }
  .prompt-text { font-size: 1.2rem; }
}
