/* ==========================================================================
   GenPvP Components CSS
   Bento Grid Layout, Tactical Cards, Widgets, Badges, Tables & Modals
   Adhering to "design-taste-frontend" (Anti-slop) & "bento" (Modular Grid)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Bento Grid System (Modular, Asymmetric, Scannable)
   -------------------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 20px rgba(0, 0, 0, 0.25);
}

.bento-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-surface-elevated);
  transform: translateY(-3px);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 20px var(--accent-primary-glow);
}

/* Bento Column Spans */
.bento-col-12 { grid-column: span 12; }
.bento-col-8 { grid-column: span 8; }
.bento-col-7 { grid-column: span 7; }
.bento-col-6 { grid-column: span 6; }
.bento-col-5 { grid-column: span 5; }
.bento-col-4 { grid-column: span 4; }
.bento-col-3 { grid-column: span 3; }

/* Bento Row Spans */
.bento-row-2 { grid-row: span 2; }

/* Bento Card Variants */
.bento-card-highlight {
  background: 
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12) 0%, transparent 65%),
    var(--bg-surface);
  border-color: rgba(56, 189, 248, 0.3);
}

.bento-card-raid {
  background: 
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.12) 0%, transparent 65%),
    var(--bg-surface);
  border-color: rgba(239, 68, 68, 0.25);
}

.bento-card-emerald {
  background: 
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12) 0%, transparent 65%),
    var(--bg-surface);
  border-color: rgba(16, 185, 129, 0.25);
}

.bento-card-purple {
  background: 
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.12) 0%, transparent 65%),
    var(--bg-surface);
  border-color: rgba(168, 85, 247, 0.25);
}

.bento-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  margin-bottom: 16px;
  width: fit-content;
}

.bento-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.bento-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

.bento-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* Blueprint Visual in Bento */
.bento-blueprint-wrap {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #06080d;
  border: 1px solid var(--border-subtle);
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bento-blueprint-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.9;
  transition: transform 0.4s ease;
}

.bento-card:hover .bento-blueprint-wrap img {
  transform: scale(1.03);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Buttons (High Contrast, Tactile States)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px;
  text-decoration: none;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #090b10;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #0369a1 100%);
  color: #000000;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #34d399 0%, #047857 100%);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  min-height: 38px;
}

/* --------------------------------------------------------------------------
   IP Copy Widget
   -------------------------------------------------------------------------- */
.ip-copy-widget {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-fast);
  max-width: 100%;
}

.ip-copy-widget:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 8px 30px var(--accent-primary-glow);
}

.ip-text-group {
  display: flex;
  flex-direction: column;
  margin-right: 16px;
  text-align: left;
}

.ip-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.ip-address {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-primary);
  user-select: all;
}

.btn-copy-ip {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  transition: all var(--transition-fast);
}

.btn-copy-ip:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Server Status Badge
   -------------------------------------------------------------------------- */
.server-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: #34d399;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite ease-in-out;
}

.server-status-badge.offline {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.server-status-badge.offline .status-dot {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* --------------------------------------------------------------------------
   Cards (Feature, Loop, etc.)
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-surface-elevated);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: inline-block;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-secondary);
}

.breadcrumb-item a:hover {
  color: var(--accent-primary);
}

.breadcrumb-separator {
  user-select: none;
  opacity: 0.5;
}

.breadcrumb-item[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Responsive Tables & Level Highlight
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

thead {
  background: var(--bg-surface-elevated);
  border-bottom: 2px solid var(--border-strong);
}

th {
  padding: 14px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
  background-color: rgba(56, 189, 248, 0.05);
}

/* --------------------------------------------------------------------------
   Command Badges (Click to Copy)
   -------------------------------------------------------------------------- */
.command-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.command-badge:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
}

.command-badge::after {
  content: "📋";
  font-size: 0.75rem;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Toast Container & Notifications
   Konum: Ekranın üstü (Sepet çekmecesi ve satın alma butonunun üstünü asla kapatmaz)
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  bottom: auto;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (max-width: 640px) {
  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    align-items: center;
  }
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInDown 0.25s ease-out;
  max-width: 380px;
}

@keyframes slideInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Modal Dialog
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  max-width: 500px;
  width: 100%;
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* Responsive Bento Breakpoints */
@media (max-width: 1024px) {
  .bento-col-8, .bento-col-7, .bento-col-6, .bento-col-5, .bento-col-4, .bento-col-3 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bento-col-12, .bento-col-8, .bento-col-7, .bento-col-6, .bento-col-5, .bento-col-4, .bento-col-3 {
    grid-column: span 1;
  }
  .bento-row-2 {
    grid-row: span 1;
  }
  .bento-card {
    padding: 20px;
  }
}
