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

:root {
  --bg: #02070c;
  --panel: rgba(8, 18, 24, 0.94);
  --panel2: #0b1820;
  --green: #20ff6b;
  --green2: #12b84a;
  --cyan: #45f3ff;
  --blue: #3498db;
  --yellow: #ffd54f;
  --text: #ffffff;
  --muted: #a8c6c8;
  --danger: #e74c3c;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(69,243,255,0.20), transparent 32%),
    radial-gradient(circle at top right, rgba(32,255,107,0.16), transparent 30%),
    radial-gradient(circle at bottom, rgba(52,152,219,0.14), transparent 35%),
    linear-gradient(180deg, #02070c, #06141a 55%, #02070c);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  z-index: -1;
}

/* NAVBAR */

.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  min-height: 86px;
  padding: 12px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(4, 12, 18, 0.90);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(69,243,255,0.28);
  box-shadow: 0 8px 35px rgba(69,243,255,0.10);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #ffffff;
  white-space: nowrap;
  text-shadow:
    0 0 14px rgba(69,243,255,0.55),
    0 0 20px rgba(32,255,107,0.28);
}

.logo-text span {
  color: var(--cyan);
}

.nav-right,
#authArea {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* BUTTONS */

button,
.nav-btn,
.admin-btn {
  border: none;
  outline: none;
  background: linear-gradient(135deg, #107c10, #3498db);
  color: white;
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.22s ease;
  position: relative;
  overflow: hidden;
}

button:hover,
.nav-btn:hover,
.admin-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #20ff6b, #45f3ff);
  color: #02070c;
  box-shadow: 0 0 22px rgba(69,243,255,0.45);
}

.support-btn {
  background: linear-gradient(135deg, #ffb300, #ffd54f) !important;
  color: #111 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 18px rgba(255,193,7,0.45) !important;
}

.support-btn:hover {
  background: linear-gradient(135deg, #ffd54f, #fff176) !important;
  color: #111 !important;
  box-shadow: 0 0 28px rgba(255,193,7,0.75) !important;
}

.nav-btn::after,
button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
}

.nav-btn:hover::after,
button:hover::after {
  animation: shine 0.65s ease;
}

@keyframes shine {
  from { left: -80%; }
  to { left: 130%; }
}

/* HERO */

.hero {
  position: relative;
  text-align: center;
  padding: 95px 20px 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(69,243,255,0.15), rgba(32,255,107,0.10)),
    rgba(6, 18, 24, 0.70);
  border: 1px solid rgba(69,243,255,0.24);
  box-shadow: inset 0 0 50px rgba(69,243,255,0.05);
  z-index: -1;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 64px);
  margin-bottom: 16px;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(90deg, #ffffff, #45f3ff, #20ff6b);
  -webkit-background-clip: text;
  color: transparent;
  animation: glowText 3s ease-in-out infinite alternate;
}

.hero p {
  color: #bffaff;
  font-size: 18px;
  margin-bottom: 28px;
}

@keyframes glowText {
  from {
    filter: drop-shadow(0 0 6px rgba(69,243,255,0.25));
  }
  to {
    filter: drop-shadow(0 0 18px rgba(32,255,107,0.30));
  }
}

/* FORM */

.search-box {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

input,
select,
textarea {
  background: rgba(6, 18, 24, 0.92);
  color: white;
  border: 1px solid rgba(69,243,255,0.35);
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
  transition: 0.2s;
}

.search-box input {
  width: min(420px, 100%);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #20ff6b;
  box-shadow:
    0 0 14px rgba(69,243,255,0.25),
    0 0 18px rgba(32,255,107,0.16);
}

.container {
  width: min(1180px, 92%);
  margin: 44px auto;
}

.section-title,
.comments-section h2,
.profile-section h2,
.modal-content h2,
#adminPanel h2,
#rolePanel h2 {
  font-size: 30px;
  margin-bottom: 24px;
  color: #45f3ff !important;
  text-shadow:
    0 0 14px rgba(69,243,255,0.35),
    0 0 20px rgba(32,255,107,0.18);
}

/* GAMES */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

.games-grid > div {
  position: relative;
  background:
    linear-gradient(180deg, rgba(10, 28, 36, 0.96), rgba(5, 12, 18, 0.96)) !important;
  border: 1px solid rgba(69,243,255,0.22) !important;
  border-radius: 22px !important;
  padding: 16px !important;
  box-shadow: 0 18px 55px rgba(0,0,0,0.34);
  overflow: hidden;
  transition: 0.28s ease;
  animation: cardIn 0.45s ease both;
}

.games-grid > div::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(130deg, transparent, rgba(69,243,255,0.22), rgba(32,255,107,0.16), transparent);
  opacity: 0;
  transition: 0.28s;
  pointer-events: none;
}

.games-grid > div:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(69,243,255,0.70) !important;
  box-shadow:
    0 22px 60px rgba(69,243,255,0.16),
    0 0 26px rgba(32,255,107,0.10);
}

.games-grid > div:hover::before {
  opacity: 1;
}

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

.games-grid img {
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 3 / 4;
  height: auto !important;
  object-fit: cover;
  border-radius: 16px !important;
  margin-bottom: 16px;
  background: #0b0c10;
  transition: 0.28s ease;
}

.games-grid > div:hover img {
  transform: scale(1.035);
  filter: brightness(1.08) contrast(1.08);
}

.games-grid h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.games-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.games-grid a,
.download-btn {
  display: inline-block;
  margin-top: 12px;
  color: #02070c !important;
  background: linear-gradient(135deg, #3498db, #20ff6b) !important;
  padding: 10px 15px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  transition: 0.22s;
}

.games-grid a:hover,
.download-btn:hover {
  background: linear-gradient(135deg, #45f3ff, #20ff6b) !important;
  box-shadow: 0 0 25px rgba(69,243,255,0.45);
}

/* MODAL */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 5000;
  padding: 18px;
  animation: modalBackdrop 0.2s ease both;
}

@keyframes modalBackdrop {
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,0.72); }
}

.modal-content {
  background:
    linear-gradient(180deg, rgba(10, 28, 36, 0.98), rgba(4, 10, 15, 0.98)) !important;
  color: white;
  padding: 28px;
  border-radius: 22px;
  width: min(430px, 95vw);
  border: 1px solid rgba(69,243,255,0.35);
  box-shadow:
    0 25px 80px rgba(0,0,0,0.60),
    0 0 32px rgba(69,243,255,0.18);
  animation: premiumModalIn 0.28s ease both;
}

@keyframes premiumModalIn {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
  color: var(--cyan);
  transition: 0.2s;
}

.close:hover {
  color: var(--green);
  transform: rotate(90deg);
}

.game-modal {
  width: min(900px, 95vw) !important;
  max-height: 90vh;
  overflow-y: auto;
}

.game-modal img {
  width: 260px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid rgba(69,243,255,0.45);
  box-shadow: 0 0 30px rgba(69,243,255,0.22);
  float: left;
  margin: 0 25px 15px 0;
}

.game-modal h2 {
  font-size: 34px;
}

.game-modal p {
  color: #d8e7dd;
  line-height: 1.7;
  font-size: 16px;
}

/* ADMIN / PROFILE */

#commentsContainer > div,
#commentFormContainer > div,
#profileContainer > div,
#adminPanel,
#rolePanel,
.comment-card,
.comment-form-card,
.comment-login-card,
.comment-notice,
.empty-comments,
.comments-loading {
  background:
    linear-gradient(180deg, rgba(10, 28, 36, 0.96), rgba(5, 12, 18, 0.96)) !important;
  border: 1px solid rgba(69,243,255,0.24) !important;
  box-shadow:
    0 18px 55px rgba(0,0,0,0.30),
    0 0 22px rgba(69,243,255,0.08) !important;
}

#adminPanel,
#rolePanel {
  max-width: 1150px;
  margin: 32px auto !important;
  border-radius: 18px !important;
}

/* COMMENTS */

.comments-section,
.profile-section {
  padding: 15px 0 45px;
}

#commentFormContainer {
  margin-bottom: 18px;
}

.comment-form-card,
.comment-login-card,
.comment-notice,
.empty-comments,
.comments-loading {
  border-radius: 18px;
}

.comment-form-card {
  padding: 18px;
}

.comment-form-card textarea,
.reply-form textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.55;
}

.comment-form-card textarea {
  min-height: 105px;
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.comment-form-footer small {
  color: var(--muted);
}

.comment-login-card {
  text-align: center;
  padding: 32px 22px;
  margin-top: 15px;
}

.comment-login-card .login-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(69,243,255,0.12);
  border: 1px solid rgba(69,243,255,0.35);
  font-size: 26px;
}

.comment-login-card h3 {
  color: white;
  margin-bottom: 8px;
  font-size: 20px;
}

.comment-login-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.login-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-actions .secondary {
  background: rgba(16,24,32,0.95);
  border: 1px solid rgba(69,243,255,0.35);
  color: white;
}

.comment-notice {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.comment-notice.warning {
  background: linear-gradient(180deg, rgba(59,47,31,0.95), rgba(18,15,10,0.95)) !important;
  border-color: rgba(243,156,18,0.35) !important;
}

.comment-notice.error {
  border-color: rgba(231,76,60,0.45) !important;
  color: #ffb3aa;
}

.comments-loading {
  padding: 18px;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
}

.loader-dot,
.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: var(--cyan);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.75s linear infinite;
}

.btn-spinner {
  width: 13px;
  height: 13px;
  margin-right: 7px;
  vertical-align: -2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.comment-card {
  color: white;
  padding: 16px;
  border-radius: 18px;
  margin-top: 16px;
  display: flex;
  gap: 14px;
  animation: cardIn 0.28s ease both;
}

.comment-card.pending {
  background: linear-gradient(180deg, rgba(59,47,31,0.96), rgba(20,15,9,0.96)) !important;
  border-color: rgba(243,156,18,0.35) !important;
}

.comment-card.reply {
  margin-left: 20px;
  padding: 13px;
  border-left: 3px solid var(--cyan) !important;
}

.comment-avatar-wrap {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.comment-avatar-img,
.comment-avatar-letter {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
}

.comment-avatar-img {
  object-fit: cover;
  display: block;
}

.comment-avatar-letter {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #020403;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.comment-header strong,
.comment-head strong {
  color: #45f3ff !important;
}

.comment-content p {
  color: #e7f5ec;
  line-height: 1.65;
  word-break: break-word;
  margin-bottom: 12px;
}

.role-badge,
.pending-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.role-admin { background: #e74c3c; color: white; }
.role-operator { background: #f1c40f; color: #080808; }
.role-supporter { background: #3498db; color: white; }

.pending-badge {
  background: rgba(243,156,18,0.16);
  color: #f39c12;
  border: 1px solid rgba(243,156,18,0.35);
}

.comment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.comment-actions button,
.comment-pagination button {
  background: rgba(8, 20, 28, 0.96) !important;
  border: 1px solid rgba(69,243,255,0.30) !important;
  color: white;
  padding: 7px 11px;
  border-radius: 10px;
}

.comment-actions .approve-btn {
  background: linear-gradient(135deg, #107c10, #2ecc71) !important;
  border: none !important;
}

.comment-actions .delete-btn {
  background: linear-gradient(135deg, #8b1e16, #e74c3c) !important;
  border: none !important;
}

.reply-form {
  background: rgba(5,8,7,0.38);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
}

.reply-form textarea {
  min-height: 66px;
  margin-bottom: 10px;
}

.replies-box {
  margin-top: 12px;
}

.empty-comments {
  padding: 28px 20px;
  text-align: center;
  color: white;
}

.empty-comments div {
  font-size: 34px;
  margin-bottom: 8px;
}

.empty-comments p {
  color: var(--muted);
  margin-top: 6px;
}

.comment-pagination {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.comment-pagination button {
  min-width: 42px;
}

.comment-pagination button.active {
  background: linear-gradient(135deg, #45f3ff, #20ff6b) !important;
  color: #02070c !important;
}

/* TOAST */

#customToast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  padding: 12px 18px;
  border-radius: 12px;
  color: white;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(0,0,0,0.4);
  transition: 0.3s;
  animation: toastIn 0.2s ease both;
}

#customToast.toast-error { background: #e74c3c; }
#customToast.toast-success { background: #107c10; }

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

button.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #050807;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #45f3ff, #20ff6b);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #20ff6b, #45f3ff);
}

/* MOBILE */

@media (max-width: 900px) {
  .navbar {
    padding: 14px 16px;
    flex-direction: column;
    gap: 14px;
  }

  .nav-right,
  #authArea {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo-text {
    font-size: 26px;
  }

  .hero {
    padding: 65px 14px 52px;
  }

  .container {
    width: 94%;
    margin: 30px auto;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
  }

  #profileContainer > div {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 650px) {
  .game-modal img {
    float: none;
    display: block;
    margin: 0 auto 20px auto;
    width: 220px;
  }

  .game-modal h2 {
    font-size: 26px;
    text-align: center;
  }

  .game-modal p {
    text-align: center;
  }

  .download-btn {
    display: block;
    text-align: center;
  }

  .comment-card {
    flex-direction: column;
  }

  .comment-card.reply {
    margin-left: 0;
  }

  .comment-avatar-wrap {
    width: 42px;
    height: 42px;
  }

  .comment-avatar-img,
  .comment-avatar-letter {
    width: 42px;
    height: 42px;
  }

  .comment-form-footer {
    align-items: stretch;
  }

  .comment-form-footer button,
  .reply-form button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  button,
  .nav-btn,
  .admin-btn {
    padding: 9px 11px;
    font-size: 13px;
  }

  .logo-text {
    font-size: 23px !important;
  }

  .hero h1 {
    font-size: 32px;
  }

  .games-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .games-grid > div {
    padding: 11px !important;
    border-radius: 16px !important;
  }

  .games-grid h3 {
    font-size: 16px;
  }

  .games-grid p {
    font-size: 13px;
  }
}

.logo-text {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: white !important;
  text-shadow:
    0 0 12px rgba(69,243,255,0.5),
    0 0 20px rgba(32,255,107,0.25);
  white-space: nowrap !important;
}

.logo-accent,
.logo-text span {
  color: #45f3ff !important;
}

@media (max-width:520px){
  .logo-text{
    font-size:22px;
  }
}
.logo {
  display: flex !important;
  align-items: center !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
}

.logo-text {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: white !important;
  text-shadow:
    0 0 12px rgba(69,243,255,0.5),
    0 0 20px rgba(32,255,107,0.25);
  white-space: nowrap !important;
}

.logo-text span {
  color: #45f3ff !important;
}

@media (max-width:520px){
  .logo-text{
    font-size:22px !important;
  }
}
.logo img {
  display: block !important;
  height: 64px !important;
  width: auto !important;
  max-width: 360px !important;
  object-fit: contain !important;
}

.logo-text {
  display: none !important;
}
/* FINAL LOGO + MODAL FIX */

.logo {
  display: flex !important;
  align-items: center !important;
  width: auto !important;
  height: auto !important;
  max-width: 360px !important;
  background: none !important;
  overflow: hidden !important;
}

.logo img {
  display: block !important;
  height: 64px !important;
  width: auto !important;
  max-width: 360px !important;
  object-fit: contain !important;

  filter:
    drop-shadow(0 0 4px rgba(69,243,255,0.18));
}

.logo-text {
  display: none !important;
}

/* Modal ortalama */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  padding: 18px;
}

.modal[style*="block"] {
  display: flex !important;
}

.modal-content {
  margin: auto !important;
  width: min(450px, 92vw) !important;
  max-height: 90vh;
  overflow-y: auto;
}

/* Destek modalı daha iyi görünüm */
#donateModal .modal-content {
  border: 1px solid rgba(69,243,255,0.45);
  box-shadow:
    0 0 35px rgba(69,243,255,0.22),
    0 25px 80px rgba(0,0,0,0.65);
}

#donateModal button {
  background: linear-gradient(135deg, #ffb300, #ffd54f) !important;
  color: #111 !important;
  font-weight: 900 !important;
}

@media (max-width: 700px) {
  .logo {
    max-width: 240px !important;
  }

  .logo img {
    height: 48px !important;
    max-width: 240px !important;
  }
}


/* ===== Extra Responsive Enhancements ===== */
@media (max-width: 400px) {
  .hero h1 {
    font-size: 28px !important;
  }
  .hero p {
    font-size: 14px !important;
  }
  .logo img {
    height: 40px !important;
    max-width: 200px !important;
  }
  .games-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .game-modal {
    width: 95vw !important;
    max-height: 85vh !important;
  }
  .game-modal h2 {
    font-size: 22px !important;
  }
  .game-modal p {
    font-size: 14px !important;
    text-align: center !important;
  }
  button,
  .nav-btn,
  .admin-btn,
  .download-btn {
    width: 100% !important;
    font-size: 14px !important;
    padding: 12px !important;
  }
  input,
  select,
  textarea {
    width: 100% !important;
  }
}

/* ===== iOS Smooth Scroll for Modals ===== */
.modal-content,
.game-modal,
.container {
  -webkit-overflow-scrolling: touch;
}
