:root {
    --gold: #FEB706;
    --bg-dark: #0f0f11;
    --border-light: rgba(255, 255, 255, 0.05);
}

/* Hero */
.hero-section { margin-bottom: 2.5rem; }
.hero-title { font-size: 2.5rem; font-weight: 800; color: white; line-height: 1.2; margin-bottom: 0.5rem; }
.hero-divider { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; }
.hero-line { width: 4rem; height: 0.25rem; background: var(--gold); border-radius: 999px; }
.hero-subtitle { color: #94a3b8; font-size: 1rem; }

/* Mobil: Yatay Tabs */
@media (max-width: 1023px) {
    .desktop-sidebar { display: none; }

    .mobile-tabs {
        display: block;
        margin-bottom: 1.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.25rem 0 1rem 0;
        scroll-snap-type: x mandatory;
    }
    .mobile-tabs::-webkit-scrollbar { display: none; }

    .tab-container { display: inline-flex; gap: 0.5rem; padding: 0 0.25rem; }

    .campaign-tab {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem 0.5rem 0.5rem;
        background: rgba(15, 15, 17, 0.8);
        border: 1px solid var(--border-light);
        border-radius: 100px;
        transition: all 0.2s ease;
        backdrop-filter: blur(8px);
        scroll-snap-align: start;
    }
    .campaign-tab.active { background: rgba(254, 183, 6, 0.1); border-color: var(--gold); }

    .campaign-tab-logo {
        width: 2rem;
        height: 2rem;
        border-radius: 40px;
        object-fit: cover;
        border: 1px solid var(--border-light);
        background: rgba(0, 0, 0, 0.3);
    }

    .campaign-tab-info { text-align: left; }

    .campaign-tab-title {
        color: white;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .campaign-tab-reward {
        font-size: 0.65rem;
        color: #10b981;
        white-space: nowrap;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Desktop: Sidebar + İçerik */
@media (min-width: 1024px) {
    .mobile-tabs { display: none; }
    .desktop-sidebar { display: block; }

    .desktop-layout {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 2rem;
        align-items: start;
    }

    .campaign-sidebar {
        background: var(--bg-dark);
        border: 1px solid var(--border-light);
        border-radius: 24px;
        overflow: hidden;
        position: sticky;
        top: 2rem;
    }

    .sidebar-header {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-light);
        color: white;
        font-weight: 600;
        font-size: 0.9rem;
    }

    .sidebar-header span {
        color: var(--gold);
        margin-left: 0.5rem;
        font-size: 0.8rem;
        background: rgba(254, 183, 6, 0.1);
        padding: 0.15rem 0.4rem;
        border-radius: 20px;
    }

    .sidebar-list {
        max-height: 600px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--gold) rgba(255, 255, 255, 0.05);
    }

    .sidebar-list::-webkit-scrollbar { width: 4px; }
    .sidebar-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
    .sidebar-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

    .sidebar-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        transition: all 0.2s ease;
    }

    .sidebar-item:last-child { border-bottom: none; }
    .sidebar-item:hover { background: rgba(255, 255, 255, 0.02); }
    .sidebar-item.active { background: rgba(254, 183, 6, 0.05); border-left: 3px solid var(--gold); }

    .sidebar-logo {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 12px;
        object-fit: cover;
        border: 1px solid var(--border-light);
        background: rgba(0, 0, 0, 0.3);
        flex-shrink: 0;
    }

    .sidebar-info { flex: 1; min-width: 0; }

    .sidebar-title {
        color: white;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-exchange {
        color: #94a3b8;
        font-size: 0.7rem;
        margin-bottom: 0.15rem;
    }

    .sidebar-reward {
        display: inline-block;
        background: rgba(16, 185, 129, 0.1);
        border: 1px solid rgba(16, 185, 129, 0.2);
        color: #10b981;
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
        border-radius: 4px;
        white-space: nowrap;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .content-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
}

/* Ana Kampanya Kartı */
.campaign-card {
    background: rgba(15, 15, 17, 0.95);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

/* Genel taşma koruması */
.campaign-card,
.section-card,
.step-text,
.info-item span,
.short-text { overflow-wrap: anywhere; word-break: break-word; }

@media (min-width: 768px) {
    .campaign-card { padding: 2rem; }
}

/* Header */
.campaign-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.campaign-header-logo {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .campaign-header-logo { width: 4.5rem; height: 4.5rem; }
}

.campaign-header-info { flex: 1; min-width: 0; }

.campaign-exchange {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.campaign-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

@media (min-width: 768px) {
    .campaign-title { font-size: 2rem; }
}

.campaign-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Countdown */
.countdown-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.countdown-label { color: #94a3b8; font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.countdown-label i { color: var(--gold); font-size: 0.9rem; }

.countdown-numbers { display: flex; align-items: center; gap: 0.75rem; font-family: monospace; }
.countdown-item { text-align: center; min-width: 45px; }
.countdown-value { color: white; font-size: 1.35rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .countdown-value { font-size: 1.6rem; } }
.countdown-unit { color: #64748b; font-size: 0.65rem; text-transform: uppercase; }

/* Action Buttons */
.action-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.btn-primary {
    flex: 1;
    min-width: 140px;
    background: var(--gold);
    color: black;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}
.btn-primary:hover { transform: translateY(-1px); background: #e5a706; }

.btn-secondary {
    flex: 1;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.05); }

/* Content Sections */
.section-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 1.25rem;
    height: 100%;
}

.section-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.section-title i { color: var(--gold); font-size: 0.9rem; }

.step-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.step-number {
    width: 1.6rem;
    height: 1.6rem;
    background: rgba(254, 183, 6, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text { color: #cbd5e1; font-size: 0.9rem; line-height: 1.5; flex: 1; }

.info-list { display: flex; flex-direction: column; gap: 0.65rem; }
.info-item { color: #94a3b8; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.info-item i { color: var(--gold); font-size: 0.75rem; margin-top: 0.2rem; width: 1rem; }

.short-text {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

/* =========================
   MOBILE FIX PACK (APP-LIKE)
   ========================= */
@media (max-width: 1023px) {
  .desktop-layout { display: block !important; }

  .content-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    margin-top: 1rem !important;
  }

  /* mobilde height:100% boşluk yapmasın */
  .section-card { height: auto !important; }

  .campaign-card { padding: 1.25rem !important; border-radius: 20px !important; }

  .campaign-header { align-items: flex-start; }
  .campaign-title { font-size: 1.35rem !important; margin-bottom: 0.25rem !important; }

  .countdown-container { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .countdown-numbers { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 0.75rem; }
  .countdown-item { min-width: 52px; }

  /* Butonlar mobilde tek kolon */
  .action-buttons { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; flex: none; min-width: 0 !important; }
}

@media (max-width: 380px) {
  .campaign-header-logo { width: 3.25rem; height: 3.25rem; border-radius: 16px; }
  .campaign-tab-title { max-width: 110px; }
  .campaign-tab-reward { max-width: 90px; }
}


/* =========================================================
   GLOBAL OVERFLOW GUARD (prevents mobile right-shift)
   ========================================================= */
html, body { overflow-x: hidden; }

/* =========================================================
   LIST VIEW (CARDS) — HABER KART DİLİ + HİZALI CTA
   ========================================================= */
#campaignListView,
.campaigns-list-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.campaigns-list-page * { box-sizing: border-box; }

.campaigns-list-header{
  padding: 0 4px 14px 4px;
  margin-bottom: 10px;
}
.campaigns-list-header h3{
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.campaigns-list-sub{
  margin-top: 6px;
  color: #94a3b8;
  font-size: .92rem;
  line-height: 1.45;
}

.cards-section{ margin-top: 14px; }
.cards-section-title{
  color: #e5e7eb;
  font-weight: 700;
  font-size: .95rem;
  margin: 10px 0 10px 2px;
  letter-spacing: .01em;
  display:flex;
  align-items:center;
  gap:10px;
}
.cards-section-title::after{
  content:"";
  height:1px;
  flex:1;
  background: rgba(255,255,255,.06);
}

.cards-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 640px){
  .cards-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px){
  .cards-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Kart – blur + shadow, border yok; CTA altta hizalı */
.campaign-card-tile{
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-decoration: none;
  height: 100%;
}

.campaign-card-tile .tile-inner{
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(15,15,17,.88);
  border-radius: 18px;
  padding: 14px 14px 12px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.campaign-card-tile:hover .tile-inner{
  transform: translateY(-2px);
  background: rgba(17,17,20,.94);
  box-shadow: 0 24px 55px rgba(0,0,0,.55);
}

/* Üst satır */
.tile-top{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tile-logo{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
}
.tile-meta{ min-width: 0; flex: 1; }
.tile-ex{
  color: #94a3b8;
  font-size: .72rem;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-title{
  color: #fff;
  font-size: .97rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-badge{
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 700;
  padding: .28rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: #e5e7eb;
  white-space: nowrap;
}
.tile-badge.is-active{
  border-color: rgba(16,185,129,.25);
  background: rgba(16,185,129,.10);
  color: #10b981;
}
.tile-badge.is-upcoming{
  border-color: rgba(254,183,6,.25);
  background: rgba(254,183,6,.10);
  color: #fbbf24;
}
.tile-badge.is-ended{
  border-color: rgba(148,163,184,.20);
  background: rgba(148,163,184,.08);
  color: #94a3b8;
}

/* ORTA GÖVDE – flex-1, CTA’yı alta iter */
.tile-body{
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

/* Ödül satırı – ARTIK YEŞİL DEĞİL */
.tile-reward{
  color: #e5e7eb;            /* yeşil yerine nötr */
  font-size: .84rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Açıklama */
.tile-desc{
  margin-top: 6px;
  color: #cbd5e1;
  font-size: .86rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-desc-empty{
  margin-top: 6px;
  flex: 1;           /* içi boş olsa da body yüksekliğini doldursun */
}

/* Alt satır CTA – her kartta aynı hizada */
.tile-cta{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content: space-between;
  color: #fbbf24;
  font-size: .83rem;
  font-weight: 700;
}
.tile-cta i{
  font-size: .8rem;
}

/* Mobil özel */
@media (max-width: 380px){
  .tile-top{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .tile-badge{
    margin-left: 58px;
    margin-top: 6px;
  }
}

/* =========================
   BİTEN KAMPANYALAR — overlay
   ========================= */
.campaign-card-tile.is-ended-card{
  pointer-events: none;
}

.tile-ended-overlay{
  position:absolute;
  inset:0;
  border-radius: 18px;
  background: radial-gradient(circle at 20% 0%, rgba(148,163,184,.20), transparent 55%),
              rgba(0,0,0,.55);
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  pointer-events:none;
}

.tile-ended-label{
  margin: 10px 10px 0 0;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size:.74rem;
  font-weight:700;
  color:#e5e7eb;
  background: rgba(15,15,17,.8);
  border: 1px solid rgba(148,163,184,.45);
}
.tile-ended-label i{
  font-size: .8rem;
}

/* =========================================================
   DETAIL TOPBAR + HR (elite)
   ========================================================= */
.detail-topbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.detail-back{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  color:#e5e7eb;
  text-decoration:none;
  font-weight:600;
  font-size:.92rem;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
}
.detail-back:hover{ background: rgba(255,255,255,.04); }

.detail-top-actions{ display:flex; align-items:center; gap:10px; }
.icon-btn{
  width:42px;
  height:42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
  color:#e5e7eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.04); }
.icon-btn.is-copied{ border-color: rgba(254,183,6,.35); color: var(--gold); }

.detail-hr{
  height:1px;
  width:100%;
  background: linear-gradient(90deg, rgba(254,183,6,.0), rgba(254,183,6,.28), rgba(254,183,6,.0));
  margin: 6px 0 14px 0;
}

/* =========================================================
   SIDEBAR sticky + header sticky inside
   ========================================================= */
.campaign-sidebar{
  position: sticky;
  top: 88px;
}
.sidebar-header{
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-dark);
}
.sidebar-section-title{
  padding: .7rem 1.25rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
  border-top: 1px solid rgba(255,255,255,.04);
  background: rgba(0,0,0,.10);
}

/* =========================================================
   ACTION BUTTONS — MOBILE GRID FIX
   ========================================================= */
@media (max-width: 1023px){
  .action-buttons{
    display:grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
  }
  .action-buttons .action-main,
  .action-buttons .action-form{
    width: 100%;
    min-width: 0 !important;
  }
  .action-buttons .action-vip{
    grid-column: 1 / -1;
    width: 100%;
  }
  /* if only one of main/form exists, make it full width */
  .action-buttons .action-main:only-child,
  .action-buttons .action-form:only-child{
    grid-column: 1 / -1;
  }
}

/* =========================================================
   ENDED STATE — dim + block clicks
   ========================================================= */
.campaign-card.is-ended{
  position: relative;
}
.campaign-card.is-ended .short-text,
.campaign-card.is-ended .content-grid,
.campaign-card.is-ended .campaign-header,
.campaign-card.is-ended .countdown-container,
.campaign-card.is-ended .action-buttons{
  opacity: .55;
}
.campaign-card.is-ended .action-buttons a,
.campaign-card.is-ended .action-buttons button{
  pointer-events: none;
  cursor: not-allowed;
}
.ended-overlay{
  position:absolute;
  inset:0;
  border-radius: 24px;
  background: rgba(0,0,0,.18);
  pointer-events: none;
}
.ended-badge{
  position:absolute;
  top: 14px;
  right: 14px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size:.78rem;
  font-weight:700;
  color:#e5e7eb;
  background: rgba(15,15,17,.65);
  border: 1px solid rgba(255,255,255,.10);
}

/* short-text gold tint */
.short-text{
  background: rgba(254, 206, 6, 0.12) !important;
  border: 1px solid rgba(254, 206, 6, 0.10) !important;
}
