:root {
  --bg1: #0f172a;
  --bg2: #0b1020;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --node-color1: rgba(124, 58, 237, 0.1);
  --node-color2: rgba(6, 182, 212, 0.1);
  --node-color3: rgba(236, 72, 153, 0.1);
  --node-color4: rgba(16, 185, 129, 0.1);
  --tools-gradient: linear-gradient(135deg, #3b82f6, #10b981);
}

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

html,
body {
  height: 100%;
  font-family: "Poppins", system-ui, Segoe UI, Roboto, "Helvetica Neue", Arial;
  color: #e6eef8;
  overflow-x: hidden; /* Firefox clipping hatasına karşı */
}

body {
  background: radial-gradient(1000px 600px at 10% 20%, rgba(124, 58, 237, 0.12), transparent), radial-gradient(900px 500px at 90% 80%, rgba(6, 182, 212, 0.08), transparent), linear-gradient(180deg, var(--bg1), var(--bg2));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

/* Başlık ve slogan */
h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 10px;
}
h1 span.g-highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.slogan {
  font-size: clamp(16px, 2.5vw, 26px);
  font-weight: 500;
  color: rgba(230, 238, 248, 0.95);
  margin-bottom: 32px;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  font-feature-settings: "liga", "kern";
  line-height: 1.6;
}

/* Ağacımsı node container */
.tree-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.node {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  min-width: 80px;
  max-width: 140px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.2);
  padding: 10px;
  opacity: 0;
  transform: translateY(20px);
  animation-fill-mode: forwards;
  word-break: break-word;
  text-align: center;
  position: relative;
  white-space: nowrap;
  transition: transform 0.25s ease, background 0.25s ease;
}
.node span {
  font-size: 14px;
  text-align: center;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.node1::after {
  background: var(--node-color1);
}
.node2::after {
  background: var(--node-color2);
}
.node3::after {
  background: var(--node-color3);
}
.node4::after {
  background: var(--node-color4);
}

.node::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 0 0 12px 12px;
}

.node:hover {
  transform: scale(1.03);
}

/* Sosyal ve mail ikonları */
.mail-contact {
  margin-top: 30px;
}
.mail-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e6eef8;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}
.mail-contact a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}
.contact-socials a {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e6eef8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.contact-socials a:hover {
  background: rgba(124, 58, 237, 0.2);
}
.contact-socials a.tools {
  background: var(--tools-gradient);
  color: white;
  border: none;
  font-weight: 600;
}

footer {
  margin-top: 40px;
  color: rgba(230, 238, 248, 0.4);
  font-size: 14px;
}

/* Ortak popup stilleri */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.popup-box {
  background: var(--bg2);
  padding: 30px;
  border-radius: 16px;
  max-width: 450px;
  width: 90%;
  text-align: left;
  color: #e6eef8;
  position: relative;
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
  opacity: 0;
  max-height: 80vh;
  overflow-y: auto;
  line-height: 1.6;
}

.popup-overlay.show .popup-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.popup-box h2 {
  margin-bottom: 15px;
}
.popup-box p {
  margin-bottom: 15px;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #e6eef8;
}

/* Duyurular */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.announcement-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
  transition: all 0.2s ease;
  line-height: 1.6;
}
.announcement-item:hover {
  background: rgba(124, 58, 237, 0.1);
  transform: scale(1.02);
}
.announcement-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.announcement-item p {
  font-size: 13px;
  color: #e6eef8;
  margin-bottom: 6px;
}
.announcement-item a {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent2);
  text-decoration: none;
}
.announcement-item a:hover {
  text-decoration: underline;
}

/* Ortak popup / sabit ikon stili */
.popup-icon,
.mail-contact a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1010;
}

.popup-icon:hover,
.mail-contact a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.popup-icon i {
  font-size: 24px;
  color: #e6eef8;
}

/* 📱 Sabit ikon pozisyon düzeltmesi (Firefox uyumlu) */
#announcementIcon,
#openPopup {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1100;
  transform: translateZ(0);
}
#announcementIcon {
  left: 16px;
}
#openPopup {
  right: 16px;
}

/* Animasyon keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(24px, 6vw, 36px);
  }
  h1 .subline {
    display: block;
    white-space: nowrap;
    margin-top: 4px;
  }
  .slogan {
    font-size: clamp(14px, 4vw, 18px);
    white-space: normal;
    display: block;
    line-height: 1.4;
    padding-top: 4px;
    padding-bottom: 4px;
    overflow: visible;
  }

  .node {
    min-width: 70px;
    max-width: 120px;
    height: 45px;
    font-size: 13px;
    padding: 6px 10px;
  }
  .contact-socials a {
    font-size: 13px;
    padding: 6px 10px;
  }
  .popup-icon,
  .mail-contact a {
    width: 42px;
    height: 42px;
  }
  .popup-icon i {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: clamp(20px, 7vw, 28px);
  }
  .slogan {
    font-size: clamp(12px, 5vw, 16px);
  }
  .node {
    min-width: 60px;
    max-width: 100px;
    height: 40px;
    font-size: 12px;
    padding: 5px 8px;
  }
  .contact-socials a {
    font-size: 12px;
    padding: 5px 8px;
  }
  .popup-icon,
  .mail-contact a {
    width: 38px;
    height: 38px;
  }
  .popup-icon i {
    font-size: 18px;
  }
}

/* 🔔 Bildirim Rozeti */
#announcementIcon {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px;
  z-index: 1100;
}

#announcementIcon .notify-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 6px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  min-width: 18px;
  text-align: center;
  animation: pulseBadge 1.6s infinite;
}

@keyframes pulseBadge {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}
