/* W'Sandwich Design System */
:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(18, 26, 44, 0.75);
  --bg-card-hover: rgba(26, 38, 64, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(0, 136, 255, 0.35);
  --accent-blue: #0088ff;
  --accent-cyan: #00e5ff;
  --accent-glow: rgba(0, 136, 255, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 136, 255, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(59, 130, 246, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background grid effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  padding: 48px 24px 80px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header & Logo */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 0.6s ease-out;
}

.logo-wrapper {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 136, 255, 0.15), rgba(0, 229, 255, 0.05));
  border: 1px solid var(--border-highlight);
  box-shadow: 0 0 30px rgba(0, 136, 255, 0.25);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.logo-wrapper:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 45px rgba(0, 136, 255, 0.45);
}

.logo-svg {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 136, 255, 0.6));
}

.title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.title-logo-inline {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 136, 255, 0.6));
}

.title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.subtitle {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Dynamic Buttons Container */
.buttons-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.7s ease-out;
}

/* Public Custom Action Buttons */
.action-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}

.action-button:hover::before {
  left: 100%;
}

.action-button:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 30px var(--btn-glow, rgba(0, 136, 255, 0.45)), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  filter: brightness(1.08);
}

.action-button:active {
  transform: translateY(0) scale(0.99);
}

.btn-content-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.btn-emoji {
  font-size: 1.45rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.btn-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.05rem;
}

.btn-arrow {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
}

.action-button:hover .btn-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Skeleton Loading State */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.skeleton-btn {
  height: 64px;
  background: linear-gradient(90deg, #121a2c 25%, #1c2842 50%, #121a2c 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Footer / Admin Links */
.footer {
  margin-top: 50px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent-cyan);
  background: rgba(0, 136, 255, 0.1);
  border-color: var(--border-highlight);
}

/* ==========================================================================
   ADMIN PANEL STYLES
   ========================================================================== */

.admin-container {
  max-width: 900px;
  width: 100%;
  padding: 40px 24px 80px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-badge {
  background: linear-gradient(135deg, rgba(0, 136, 255, 0.2), rgba(0, 229, 255, 0.2));
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-highlight);
}

.admin-db-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.03em;
}

.admin-db-badge.test {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.admin-db-badge.prod {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Card components */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 28px;
  width: 100%;
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Login card */
.login-card {
  max-width: 420px;
  margin: 60px auto 0;
  text-align: center;
}

.login-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.2);
  background: rgba(15, 23, 42, 0.85);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Color Picker Row */
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input-native {
  width: 48px;
  height: 44px;
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
}

.color-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-preset-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.color-preset-btn:hover {
  transform: scale(1.15);
  border-color: #fff;
}

/* Emoji Quick Select */
.emoji-presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.emoji-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1.1rem;
  padding: 4px 8px;
  cursor: pointer;
  transition: var(--transition);
}

.emoji-preset-btn:hover {
  background: rgba(0, 136, 255, 0.2);
  border-color: var(--accent-blue);
  transform: scale(1.1);
}

/* Buttons (Standard UI) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #0088ff, #0066cc);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1a96ff, #0077ee);
  box-shadow: 0 6px 20px rgba(0, 136, 255, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-highlight);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Admin Item in List */
.admin-button-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 16px;
  transition: var(--transition);
}

.admin-button-item:hover {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(0, 136, 255, 0.3);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.item-color-preview {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-link {
  font-size: 0.825rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}

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

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent-blue);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   MINECRAFT SERVER BUTTON & MODAL STYLES
   ========================================================================== */

.btn-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-left: 8px;
}

/* Button Type Selector (Segmented Control) */
.type-selector-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(15, 23, 42, 0.8);
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.type-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.type-option-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.type-option-btn.active {
  background: linear-gradient(135deg, rgba(0, 136, 255, 0.25), rgba(0, 229, 255, 0.15));
  color: #fff;
  border-color: var(--border-highlight);
  box-shadow: 0 2px 10px rgba(0, 136, 255, 0.2);
}

/* Minecraft Details Modal on Public Page */
.mc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

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

.mc-modal-card {
  background: linear-gradient(180deg, #10192d 0%, #0c1222 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 136, 255, 0.2);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

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

.mc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mc-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.mc-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.mc-version-tag {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.12);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.mc-version-tag strong {
  color: #fff;
  font-weight: 700;
}

.mc-version-tag.detected {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border-color: rgba(192, 132, 252, 0.35);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.15);
}

/* Button Version Pill (on Homepage list) */
.btn-version-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-left: 8px;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* App/Site Version Badge */
.app-version-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 6px;
  letter-spacing: 0.04em;
}

.mc-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  transition: var(--transition);
}

.mc-section:hover {
  border-color: rgba(0, 136, 255, 0.35);
  background: rgba(15, 23, 42, 0.85);
}

.mc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mc-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-edition-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mc-edition-pill.bedrock {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.mc-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
  margin-bottom: 8px;
}

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

.mc-field-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
}

.mc-field-value {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 600;
  word-break: break-all;
  flex: 1;
}

.mc-copy-btn {
  background: rgba(0, 136, 255, 0.15);
  border: 1px solid rgba(0, 136, 255, 0.35);
  color: #60a5fa;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  flex-shrink: 0;
}

.mc-copy-btn:hover {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 136, 255, 0.5);
}

.mc-copy-btn.copied {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--success);
  color: #34d399;
}

.mc-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.mc-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   DEDICATED MINECRAFT SERVER WEBPAGE STYLES
   ========================================================================== */

.server-page-container {
  max-width: 680px;
  width: 100%;
  padding: 36px 20px 80px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.back-nav {
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.back-link:hover {
  color: #fff;
  background: rgba(0, 136, 255, 0.15);
  border-color: var(--border-highlight);
  transform: translateX(-3px);
}

/* Server Hero Card */
.server-hero-card {
  background: linear-gradient(180deg, rgba(16, 25, 45, 0.85) 0%, rgba(10, 16, 30, 0.9) 100%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 136, 255, 0.15);
  margin-bottom: 24px;
}

.server-hero-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.server-avatar-wrap {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 136, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.server-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.server-avatar-fallback {
  font-size: 2.4rem;
  line-height: 1;
}

.server-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.server-title-text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 700;
  width: fit-content;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-badge.checking {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.status-badge.online .status-dot {
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* MOTD Display Box */
.motd-card {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 16px;
  font-family: 'Minecraft', 'Consolas', monospace, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e2e8f0;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.motd-line {
  word-break: break-word;
}

/* Connection Cards */
.connection-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}

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

.edition-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ip-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  gap: 16px;
  margin-bottom: 12px;
}

.ip-address-text {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.btn-copy-main {
  background: linear-gradient(135deg, #0088ff, #0066cc);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-copy-main:hover {
  background: linear-gradient(135deg, #1a96ff, #0077ee);
  box-shadow: 0 0 15px rgba(0, 136, 255, 0.6);
  transform: translateY(-1px);
}

.btn-copy-main.copied {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}


.btn-refresh-status {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-refresh-status:hover {
  background: rgba(0, 229, 255, 0.15);
  color: #fff;
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   Test Space Banner (Local Tunnel & Dev Environments)
   ========================================================================== */
#test-space-banner {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 999999;
}

.test-space-inner {
  background: linear-gradient(90deg, #d97706, #b91c1c, #d97706);
  background-size: 200% 100%;
  animation: testSpaceGlow 4s ease infinite;
  color: #ffffff;
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.test-space-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.test-space-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.test-space-tag {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.test-space-action-btn {
  background: #ffffff;
  color: #b91c1c !important;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  cursor: pointer;
}

.test-space-action-btn:hover {
  background: #fef08a;
  color: #991b1b !important;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.test-space-action-btn:active {
  transform: translateY(0) scale(0.96);
}

.test-space-btn-icon {
  font-size: 0.85rem;
}

@keyframes testSpaceGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (max-width: 640px) {
  .test-space-inner {
    padding: 6px 10px;
    gap: 8px;
  }
  .test-space-sub {
    display: none;
  }
  .test-space-action-btn {
    padding: 3px 10px;
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   Minecraft Admin Form Controls & Toggles
   ========================================================================== */
.mc-config-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 18px;
}

.mc-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: var(--transition);
}

.toggle-control:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.35);
}

.toggle-control input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 38px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.toggle-control input[type="checkbox"]:checked + .toggle-slider {
  background: #10b981;
}

.toggle-control input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mc-cracked-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mc-cracked-tag.premium {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}

/* Server Edition 3-Way Segmented Toggle */
.edition-toggle-group {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}

.edition-radio-btn {
  flex: 1;
  text-align: center;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.edition-radio-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.edition-radio-btn span {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.edition-radio-btn:hover span {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.edition-radio-btn input[type="radio"]:checked + span {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   COMPREHENSIVE MOBILE & RESPONSIVE OPTIMIZATIONS
   ========================================================================== */

/* Universal Touch & Mobile Sizing */
html, body {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

@media (hover: none) and (pointer: coarse) {
  /* Mobile touch targets feedback */
  .btn, .btn-link, .type-option-btn, .edition-radio-btn span, .toggle-control, .mc-copy-btn, .btn-copy-main {
    -webkit-tap-highlight-color: transparent;
  }

  .btn-link:active, .btn:active, .btn-copy-main:active {
    transform: scale(0.98);
  }
}

/* Tablet & Smaller Screens (<= 768px) */
@media (max-width: 768px) {
  .admin-container {
    padding: 24px 16px 60px;
  }

  .card {
    padding: 22px 18px;
  }
}

/* Small Screens & Standard Phones (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding: 28px 16px 60px;
  }

  .header {
    margin-bottom: 28px;
  }

  .logo-wrapper {
    width: 76px;
    height: 76px;
    margin-bottom: 16px;
    border-radius: 20px;
  }

  .title {
    font-size: 1.85rem;
    margin-bottom: 6px;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .btn-link {
    min-height: 52px;
    padding: 13px 18px;
  }

  .server-page-container {
    padding: 20px 14px 60px;
  }

  .server-hero-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .connection-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }

  .card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }

  .card-title {
    font-size: 1.15rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }

  .admin-nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .admin-nav-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .form-input {
    font-size: 16px !important; /* Prevents iOS Safari auto-zoom on focus */
    padding: 11px 14px;
  }

  /* Modal responsive sizing */
  .modal-overlay {
    padding: 12px;
  }

  .modal-content {
    padding: 20px 16px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }

  /* Test space banner mobile styling */
  .test-space-inner {
    font-size: 0.72rem;
    padding: 6px 10px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .test-space-sub {
    display: none;
  }
}

/* Phones & Narrow Screens (<= 520px) */
@media (max-width: 520px) {
  /* Server Hero Header */
  .server-hero-header {
    gap: 14px;
  }

  .server-avatar-wrap {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .server-avatar-fallback {
    font-size: 1.9rem;
  }

  .server-title-text {
    font-size: 1.3rem;
    white-space: normal;
    word-break: break-word;
  }

  /* IP Copy Box Stacking */
  .ip-copy-box {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .ip-address-text {
    font-size: 1.05rem;
    word-break: break-all;
  }

  .btn-copy-main {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.95rem;
  }

  /* Edition 3-Way Segmented Toggle */
  .edition-toggle-group {
    flex-direction: column;
    gap: 6px;
  }

  .edition-radio-btn span {
    padding: 10px 12px;
    font-size: 0.875rem;
    white-space: normal;
  }

  /* Minecraft Toggles Grid */
  .mc-toggles-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .toggle-control {
    padding: 10px 12px;
  }

  /* Admin Buttons List Item */
  .admin-button-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .item-left {
    width: 100%;
  }

  .item-title {
    white-space: normal;
    word-break: break-word;
  }

  .item-link {
    word-break: break-all;
  }

  .item-actions {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    gap: 8px;
  }

  .item-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 8px;
  }

  .reorder-btns {
    flex-direction: row;
    gap: 6px;
  }

  .reorder-btns .btn-icon {
    width: 36px;
    height: 36px;
  }

  /* Color presets on mobile */
  .color-preset-btn {
    width: 32px;
    height: 32px;
  }

  .emoji-preset-btn {
    padding: 6px 10px;
    font-size: 1.2rem;
  }
}

/* Extra Narrow Phones (<= 380px) */
@media (max-width: 380px) {
  .logo-wrapper {
    width: 68px;
    height: 68px;
  }

  .logo-svg {
    width: 40px;
    height: 40px;
  }

  .title {
    font-size: 1.65rem;
  }

  .btn-link {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .mc-field-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .mc-field-row .mc-copy-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-nav-actions {
    grid-template-columns: 1fr;
  }
}
