/* ==========================================================================
   Takipçileri Dövüştürüyorum - Master Design System & Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #0a0d14;
  --bg-card: #131926;
  --bg-card-hover: #1a2234;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 58, 237, 0.3);
  
  --primary-red: #ff2a5f;
  --primary-red-glow: rgba(255, 42, 95, 0.4);
  --primary-blue: #00d2ff;
  --primary-blue-glow: rgba(0, 210, 255, 0.4);
  --accent-gold: #ffd700;
  --accent-purple: #7c3aed;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --font-main: 'Outfit', sans-serif;
  --font-arcade: 'Press Start 2P', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Animated Grid & Glow */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 42, 95, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0, 210, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
  z-index: -2;
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

/* App Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px 20px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand-icon {
  font-size: 1.8rem;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(5deg); }
}

.brand-name {
  color: var(--text-main);
}

.brand-name .highlight {
  color: var(--primary-red);
  margin-left: 4px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sound-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  user-select: none;
}

.sound-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 40px;
}

.badge {
  display: inline-block;
  background: rgba(255, 42, 95, 0.15);
  color: var(--primary-red);
  border: 1px solid rgba(255, 42, 95, 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Arena Section */
.arena-section {
  margin-bottom: 60px;
}

.preset-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.preset-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-preset:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent-purple);
  color: #fff;
  transform: translateY(-2px);
}

/* Fight Grid */
.fight-grid {
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
}

@media (max-width: 850px) {
  .fight-grid {
    grid-template-columns: 1fr;
  }
}

/* Fighter Cards */
.fighter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-main);
  transition: var(--transition);
}

.fighter-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.corner-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.corner-red {
  background: rgba(255, 42, 95, 0.2);
  color: var(--primary-red);
  border: 1px solid rgba(255, 42, 95, 0.3);
}

.corner-blue {
  background: rgba(0, 210, 255, 0.2);
  color: var(--primary-blue);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

/* Avatar Box */
.avatar-container {
  width: 120px;
  height: 120px;
  margin: 10px auto 20px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-container img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fighter-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.6;
  z-index: 1;
}

.red-glow { background: var(--primary-red); }
.blue-glow { background: var(--primary-blue); }

/* Input Group */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.input-wrapper .prefix {
  color: var(--text-dim);
  font-weight: 700;
  margin-right: 4px;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 0;
}

/* Stats Box */
.stats-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-bar {
  width: 120px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--primary-blue));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* HP Bar */
.hp-wrapper {
  margin-top: 10px;
}

.hp-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.hp-bar {
  width: 100%;
  height: 14px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-full);
  padding: 2px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background 0.3s ease;
}

.hp-low {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%) !important;
}

/* VS Center Controls */
.vs-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.vs-badge {
  font-family: var(--font-arcade);
  font-size: 2.2rem;
  color: var(--primary-red);
  text-shadow: 0 0 20px var(--primary-red-glow);
  animation: vsPulse 1.5s infinite ease-in-out;
  user-select: none;
}

@keyframes vsPulse {
  0%, 100% { transform: scale(1); text-shadow: 0 0 20px var(--primary-red-glow); }
  50% { transform: scale(1.1); text-shadow: 0 0 35px var(--primary-red); }
}

.btn-fight {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-purple) 100%);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px -5px var(--primary-red-glow);
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.btn-fight:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px -5px var(--primary-red);
}

.btn-fight:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.fight-speed-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}

.btn-speed {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-speed.active, .btn-speed:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}

/* Combat Log Card */
.combat-log-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-main);
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.log-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.log-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.log-body {
  height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 8px;
}

/* Custom Scrollbar */
.log-body::-webkit-scrollbar {
  width: 6px;
}
.log-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.log-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.log-entry {
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--border-color);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-entry.system { border-left-color: var(--accent-purple); color: var(--text-muted); }
.log-entry.red { border-left-color: var(--primary-red); background: rgba(255, 42, 95, 0.08); }
.log-entry.blue { border-left-color: var(--primary-blue); background: rgba(0, 210, 255, 0.08); }
.log-entry.crit { border-left-color: var(--accent-gold); background: rgba(255, 215, 0, 0.12); font-weight: 800; }
.log-entry.ko { border-left-color: #10b981; background: rgba(16, 185, 129, 0.15); font-weight: 900; font-size: 1.05rem; }

/* Sections */
.section-container {
  margin-top: 70px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

/* Leaderboard Table */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-main);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 16px 24px;
}

.leaderboard-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  font-weight: 600;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
  font-size: 0.85rem;
}

.rank-1 { background: var(--accent-gold); color: #000; }
.rank-2 { background: #e2e8f0; color: #000; }
.rank-3 { background: #cd7f32; color: #fff; }

/* History Grid */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-fighters {
  font-weight: 700;
  font-size: 0.95rem;
}

.winner-tag {
  color: #10b981;
  font-weight: 800;
  font-size: 0.85rem;
}

/* Contact Card */
.contact-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(19, 25, 38, 0.95) 100%);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  box-shadow: var(--shadow-main);
}

@media (max-width: 850px) {
  .contact-card {
    grid-template-columns: 1fr;
  }
}

.contact-info h2 {
  font-size: 2rem;
  font-weight: 900;
  margin: 16px 0;
  line-height: 1.2;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
}

.email-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed var(--accent-purple);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.email-text {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  word-break: break-all;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--accent-purple);
}

.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.contact-form-wrapper h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group input, .form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent-purple);
}

.btn-send-mail {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-send-mail:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-contact {
  margin-top: 6px;
}

.footer-contact a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 700;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.trophy-icon {
  font-size: 4rem;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

.modal-title {
  font-family: var(--font-arcade);
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin: 16px 0 20px 0;
}

.winner-avatar-box {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.winner-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-name {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.winner-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.btn-modal-primary {
  flex: 1;
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  box-shadow: var(--shadow-main);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}

/* Animation triggers during fight */
.hit-anim {
  animation: hitWobble 0.25s ease-in-out;
}

@keyframes hitWobble {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(0.9) rotate(-8deg); filter: brightness(1.8); }
  75% { transform: scale(1.05) rotate(8deg); }
  100% { transform: scale(1) rotate(0deg); }
}
