/* === UcuzGames Key Theme Pro V4.0 === */
:root {
  --bg0: #04060b;
  --bg1: #070a18;
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f0f4ff;
  --muted: rgba(240, 244, 255, 0.65);
  --accent: #00f2ff;
  --accent2: #7000ff;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
  --radius: 24px;

  --font-main: 'Inter', sans-serif;
  --font-header: 'Orbitron', sans-serif;
}

/* Base */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  background: radial-gradient(1400px 900px at 15% 10%, rgba(0, 242, 255, 0.12), transparent 70%),
    radial-gradient(1000px 700px at 85% 25%, rgba(112, 0, 255, 0.12), transparent 60%),
    var(--bg0);
  line-height: 1.6;
}

/* Entrance Animations */
.anim-fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle background image + noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("img/background.jpg") center/cover no-repeat;
  opacity: .14;
  filter: blur(1.5px) saturate(1.2);
  transform: scale(1.03);
  z-index: -3;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  opacity: .10;
  pointer-events: none;
  z-index: -2;
}

/* Layout */
.logo {
  display: block;
  width: 160px;
  max-width: 44vw;
  margin: 28px auto 14px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .55));
}

.container {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto 40px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.konturlu-yazi {
  margin: 0;
  font-family: var(--font-header);
  font-weight: 900;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(to bottom, #fff, #a0ccff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.4));
}

/* Ortalayıp link alt çizgisini kaldır */
center>a {
  display: inline-block;
  text-decoration: none;
}

/* ✅ KOD ALMA REHBERİ: Cam buton + akan neon çerçeve */
.konturlu-yazi2 {
  margin: 25px auto 10px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.konturlu-yazi2::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: 0.5s;
}

.konturlu-yazi2:hover::before {
  left: 100%;
}

.konturlu-yazi2:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
  transform: translateY(-2px);
}

/* Form */
.key-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 20px;
  align-items: flex-end;
  margin-top: 30px;
}

.key-form input {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  outline: none;
  font-family: var(--font-main);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.key-form input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.key-form input:focus {
  border-color: var(--accent);
  background: rgba(0, 242, 255, 0.03);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.1), inset 0 0 10px rgba(0, 242, 255, 0.05);
  transform: translateY(-2px);
}

.submit-button {
  padding: 16px 32px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #000;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.submit-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(30deg);
  transition: 0.7s;
  opacity: 0;
}

.submit-button:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.1);
  box-shadow: 0 15px 30px rgba(0, 242, 255, 0.25);
}

.submit-button:hover::after {
  left: 120%;
  opacity: 1;
}

.submit-button:active {
  transform: translateY(-1px) scale(0.98);
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ==============================
   Popup Redesign (Premium V4.0)
   ============================== */

/* Backdrop Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 12, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  z-index: 999;
}

/* Modal Wrapper */
.popup {
  position: fixed !important;
  inset: 0 !important;
  display: none;
  z-index: 1000;
  padding: 24px;
  align-items: center;
  justify-content: center;
  background: transparent;
}

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

.popup-content.popup-pro {
  width: min(940px, 100%);
  max-height: 94vh;
  padding: 0;
  overflow-y: auto;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(10, 14, 28, 0.98), rgba(15, 20, 45, 0.95));
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  position: relative;
  font-family: var(--font-main);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-close:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  transform: rotate(90deg) scale(1.1);
}

.popup-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 520px;
}

.popup-left {
  background: url('img/popup-poster.png') center/cover no-repeat;
  border-right: 1px solid var(--border);
  position: relative;
}

.popup-left::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(4, 6, 12, 0.5));
}

.popup-right {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Modal Title Section */
.right-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.right-title {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

.platform-inline {
  display: flex;
  align-items: center;
  gap: 15px;
}

.platform-mini {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border: 1px solid var(--border);
}

.platform-inline-text {
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}

/* Account Fields */
.fields {
  display: grid;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-input {
  flex: 1;
  height: 50px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.field-input:focus {
  border-color: var(--accent);
  background: rgba(0, 242, 255, 0.05);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.copy-btn {
  height: 50px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
  transform: scale(1.05);
}

/* Primary Action Button */
.actions {
  display: flex;
  justify-content: center;
  margin-top: 5px;
}

.primary-btn {
  height: 56px;
  padding: 0 45px;
  border-radius: 12px;
  border: 0;
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 260px;
  position: relative;
  overflow: hidden;
}

.primary-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(30deg);
  transition: 0.8s;
  opacity: 0;
}

.primary-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 242, 255, 0.3);
}

.primary-btn:hover::after {
  left: 120%;
  opacity: 1;
}

/* Status / Result Display */
.result-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  margin-top: 5px;
}

.result-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-title {
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}

.steam-spinner {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.result-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 15px;
  line-height: 1.5;
}

.result-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.result-msg {
  margin-top: 15px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  text-align: center;
  letter-spacing: 0.5px;
}

/* Responsive Overrides */
@media (max-width: 860px) {
  .key-form {
    grid-template-columns: 1fr;
  }

  .popup-grid {
    grid-template-columns: 1fr;
  }

  .popup-left {
    display: none;
  }

  .popup-right {
    padding: 30px 20px;
  }

  .submit-button,
  .primary-btn {
    width: 100%;
    min-width: unset;
  }

  .field-row {
    flex-direction: column;
  }

  .copy-btn {
    width: 100%;
  }

  .logo {
    width: 140px;
    margin-top: 22px;
  }
}

@media (max-width: 480px) {
  .popup {
    padding: 12px;
  }

  .popup-content.popup-pro {
    border-radius: 16px;
  }

  .platform-inline-text {
    font-size: 16px;
  }

  .konturlu-yazi {
    font-size: 20px;
  }

  .container {
    padding: 30px 20px;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  background: rgba(2, 4, 12, 0.85);
  backdrop-filter: blur(10px);
}

.loading-card {
  width: min(480px, calc(100% - 32px));
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg1);
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

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

.loading-title {
  font-family: var(--font-header);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.loading-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 30%;
  position: absolute;
  animation: prog_anim 1.5s ease-in-out infinite;
}

@keyframes prog_anim {
  0% {
    left: -30%;
    width: 20%;
  }

  50% {
    width: 50%;
  }

  100% {
    left: 100%;
    width: 20%;
  }
}