/* ==== Reset & Base ==== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --sidebar-w: 220px;
  --brand: #2f81f7;
  --text: #e6edf3;
  --muted: #9aa9bc;
  --card: #161b22;
  --card-2: #1e242f;
}
html,
body {
  height: 100%;
}
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Fira Code",
    monospace;
  color: var(--text);
  background: #0b111a;
  overflow-x: hidden;
}

/* ==== Sabit Sidebar ==== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100%;
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
}
.sidebar-logo img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 20px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: stretch;
}
.sidebar-nav a {
  color: var(--muted, #ccc);
  text-decoration: none;
  font-size: 1rem;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 0.3s ease;
}
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.sidebar-nav a.start {
  position: relative;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
}
.sidebar-nav a.start::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 2px;
  background: linear-gradient(
    90deg,
    #ff3b3b,
    #ffba3b,
    #23d18b,
    #3bb3ff,
    #a93bff,
    #ff3b3b
  );
  background-size: 300%;
  animation: rgb-border 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
@keyframes rgb-border {
  to {
    background-position: 300% 0;
  }
}

/* ==== PAGE ==== */
.page {
  margin-left: var(--sidebar-w);
  position: relative;
  z-index: 10;
  transition: margin-left 0.3s ease-in-out;
}

/* ==== Header ==== */
.header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(12, 18, 28, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 15;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 12px;
  transition: all 0.3s ease;
}
.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0 10px;
}
.search-box .search-icon {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--muted);
  pointer-events: none;
}
.search-box:focus-within {
  border-color: #00ff90;
  box-shadow: 0 0 12px rgba(0, 255, 144, 0.3);
}
.search-box .search-icon svg {
  stroke: #9aa9bc;
  transition: stroke 0.3s ease;
}
.search-box:focus-within .search-icon svg {
  stroke: #00ff90;
}

/* ==== AUTH LINKS VƏ DROPDOWN STILLƏRİ BURADAN ÇIXARILDI ====
  ==== Onlar indi 'header-auth.css' faylındadır ====
*/

/* ==== Main Content (Hero + Editor) ==== */
.main-content {
  display: flex;
  align-items: center;
  padding: 36px 22px;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.hero-container {
  flex: 1;
  min-width: 300px;
}
.hero {
  display: flex;
  align-items: center;
  gap: 22px;
}
.hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(47, 129, 247, 0.25));
  margin-top: -150px;
}
.hero-text h1 {
  font-size: 40px;
  color: #00ff90;
  line-height: 1.1;
}
.hero-text h3 {
  font-size: 25px;
  color: #20a7cc;
  margin-top: 10px;
}
.hero-text p {
  font-size: 22px;
  margin-top: 8px;
  color: var(--muted);
  max-width: 480px;
}
.btn {
  display: block;
  margin-top: 14px;
  padding: 16px 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #a78bfa, #f472b6 50%, #facc15);
  color: #0b111a;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 35px rgba(175, 90, 245, 0.25);
  transition: transform 0.15s ease;
  text-align: center;
  font-size: 24px;
}
.btn:hover {
  transform: translateY(-2px);
}

/* ==== Editor Stack ==== */
.editor-stack {
  position: relative;
  width: 450px;
  height: 320px;
  flex-shrink: 0;
}
.editor-card {
  background: var(--card-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: absolute;
  width: 400px;
  transition: all 0.3s ease-out;
}
.editor-header {
  background: #222b36;
  color: #74b087;
  font-weight: 700;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "Fira Code", monospace;
}
.editor-card pre {
  padding: 12px;
  margin: 0;
  color: #c1ffd7;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  min-height: 120px;
}
.code-html {
  top: 0;
  left: 0;
  z-index: 1;
}
.code-css {
  top: 130px;
  left: 25px;
  z-index: 2;
}
.code-js {
  top: 280px;
  left: -20px;
  z-index: 3;
}

/* ==== Bölmələr ==== */
.section {
  padding: 48px 22px;
}
.section h2 {
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}
.section p {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: left;
  margin-bottom: 10px;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: 0.25s;
}
.card img {
  width: 140px;
  height: 140px;
  margin-top: -15px;
  margin-bottom: 20px;
}
.card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #fff;
}
.card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#panels {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}
#panels .section-header {
  text-align: center;
  margin-bottom: 40px;
}
#panels .section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: #fff;
}
#panels .section-header p {
  font-size: 1.2rem;
  color: var(--muted);
}
.panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131a24;
  border-radius: 16px;
  padding: 40px;
  gap: 40px;
  transition: 0.3s ease;
  text-decoration: none;
}
.panel-img img {
  width: 200px;
  height: auto;
  filter: none;
}
.panel-text {
  flex: 1;
  text-align: center;
}
.panel-text h3 {
  font-size: 2rem;
  margin-bottom: 18px;
  color: #fff;
}
.panel-text p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--muted);
}
.panel.html:hover {
  background: rgba(255, 140, 0, 0.15);
}
.panel.css:hover {
  background: rgba(30, 144, 255, 0.15);
}
.panel.js:hover {
  background: rgba(255, 215, 0, 0.15);
}

/* ==== Footer ==== */
.footer {
  background: #0f1622;
  color: #cfd6e1;
  padding: 40px 20px 20px;
  margin-top: 50px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}
.footer-about {
  flex: 1 1 250px;
  max-width: 350px;
}
.footer-about h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #fff;
}
.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #fff;
}
.footer-links a {
  display: block;
  margin-bottom: 8px;
  color: #cfd6e1;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-links a:hover {
  color: #00ff90;
}
.footer-socials {
  flex: 1 1 150px;
}
.footer-socials h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #fff;
}
.social-icons {
  display: flex;
  gap: 15px;
}
.social-icons a {
  font-size: 1.2rem;
  color: #cfd6e1;
  transition: color 0.3s;
}
.social-icons a:hover {
  color: #00ff90;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 15px;
  text-align: center;
  font-size: 0.85rem;
  color: #9aa3b5;
}

/* ==== İndi Kodlaşdırmağa Başla ( Panel ) ==== */
.start-hero {
  margin-top: 60px;
  padding: 40px 20px;
  background: linear-gradient(135deg, #0f1622 0%, #1b2433 100%);
  border-radius: 16px;
  display: flex;
  justify-content: center;
}
.start-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  max-width: 1100px;
  width: 100%;
}
.start-text {
  flex: 1 1 400px;
}
.start-text h2 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 16px;
}
.start-text p {
  font-size: 1rem;
  color: #cfd6e1;
  line-height: 1.7;
  margin-bottom: 24px;
}
.start-btn {
  display: block;
  margin: 30px auto 0;
  text-align: center;
  border: 2px solid transparent;
  padding: 16px 36px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  background-image: linear-gradient(#0f1622, #0f1622),
    linear-gradient(120deg, #ff3b3b, #ffba3b, #23d18b, #3bb3ff, #a93bff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: #00ff90;
  transition: 0.3s;
}
.start-btn:hover {
  transform: translateY(-2px);
}
.start-image {
  flex: 1 1 400px;
  text-align: center;
}
.start-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ==== Öyrənmə Paneli (modal placeholder) ==== */
.learn {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 20, 0.65);
  backdrop-filter: blur(2px);
  z-index: 50;
}
.learn.hidden {
  display: none;
}
.learn-dialog {
  width: min(680px, 92vw);
  border-radius: 16px;
  overflow: hidden;
  background: #0f1622;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}
.learn-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #182131;
}
.learn-head h3 {
  font-size: 1.1rem;
}
.close-learn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.learn-body {
  padding: 18px 16px;
  color: #c7d4e6;
}

.author-name {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: left;
  text-decoration: none; /* Bunu əlavə edin */
}
.author-name:hover {
  color: #fff; /* Bunu da əlavə edin */
}

/* ==== YENİLƏNMİŞ: KARUSEL SİSTEMİ (Tək Sətirli, Böyük Kartlar) ==== */
.projects-carousel-wrapper {
  position: relative;
  width: 100%;
  padding: 0 50px; /* Düymələr üçün kənarlarda boşluq */
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background-color: rgba(30, 36, 47, 0.8);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background-color: var(--card-2);
  border-color: #00ff90;
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
  left: 0;
}

.carousel-btn.next {
  right: 0;
}

.projects-carousel-container {
  overflow: hidden; /* Kənara çıxan proyektləri gizlədir */
}

.projects-carousel-track {
  display: grid;
  grid-auto-flow: column;
  /* İki sətirli görünüş olduğu kimi qalır */
  grid-template-rows: repeat(2, auto);
  /* DƏYİŞİKLİK: Böyük ekranlarda 3 kart göstərmək üçün ölçünü dəyişdik */
  grid-auto-columns: calc(33.333% - 19px);
  gap: 28px;
  transition: transform 0.5s ease-in-out;
}

.public-project-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s ease;
}

.public-project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 144, 0.5);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.public-project-card .project-preview {
  width: 100%;
  aspect-ratio: 16 / 10; /* Şəklin en/hündürlük nisbəti */
  background-color: #1e242f;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ön izləmə şəklinin özü üçün stillər */
.public-project-card .project-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Şəklin nisbətini qoruyaraq qutunu doldurur */
}

/* Şəkil olmayanda görünən standart ikon */
.public-project-card .project-thumbnail-default i {
  font-size: 48px;
  color: #555e71;
}
/* ==== KARUSEL STILLƏRİNİN SONU ==== */
.project-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #1a1a1a;
  /* Əsas dəyişiklik: Kənara çıxan hissələri gizlədirik */
  overflow: hidden;
}
.project-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-details {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.author-info {
  flex-grow: 1;
  min-width: 0;
}
.project-title {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-title:hover {
  color: #00ff90;
}
.author-name {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: left;
}
.project-stats {
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}
.stat-item,
.stat-button {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.stat-button:hover,
.stat-button.liked,
.stat-button.disliked {
  color: #fff;
}
.stat-button.liked i {
  color: #2f81f7;
}
.stat-button.disliked i {
  color: #d33;
}
.project-preview .loader {
  border: 4px solid #333;
  border-top: 4px solid #00ff90;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.no-projects-message {
  color: var(--muted);
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.2rem;
  padding: 40px 0;
}

/* ==== Dinamik Arxa Fon ==== */
.bg {
  position: fixed;
  inset: -20vmax -10vmax -20vmax -10vmax;
  z-index: 0;
  background: radial-gradient(
      60vmax 60vmax at 10% 20%,
      rgba(164, 80, 255, 0.25),
      transparent 60%
    ),
    radial-gradient(
      50vmax 50vmax at 85% 30%,
      rgba(241, 91, 181, 0.23),
      transparent 60%
    ),
    radial-gradient(
      55vmax 55vmax at 35% 85%,
      rgba(36, 198, 220, 0.22),
      transparent 60%
    ),
    linear-gradient(180deg, #0b111a, #0b111a);
  filter: blur(30px);
  animation: blobs 18s ease-in-out infinite alternate;
}
@keyframes blobs {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, -1%, 0) scale(1.05);
  }
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mix-blend-mode: screen;
}

/* ==== Hamburger Menyu və Overlay ==== */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 110;
  background: rgba(30, 36, 47, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.hamburger-menu:hover {
  background: var(--card-2);
  border-color: #00ff90;
}
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}
.overlay.is-visible {
  display: block;
}

/* ========================================================== */
/* ==== YENİ: ÇAT SİYAHISI BÖLMƏSİ STILLƏRİ ==== */
/* ========================================================== */

#chats .section-header {
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.chat-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.chat-search-wrapper .fa-search {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
}

#chat-search-input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card-2);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

#chat-search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 10px rgba(47, 129, 247, 0.3);
}

.chat-list-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}

.chat-list-container .loader-text {
  text-align: center;
  color: var(--muted);
  padding: 20px;
}

.chat-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-radius: 12px;
  background-color: var(--card);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.chat-list-item:hover {
  background-color: var(--card-2);
  border-color: rgba(255, 255, 255, 0.1);
}

.chat-list-item .avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.chat-list-item .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-list-item .status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #6e7681; /* Offline */
  border: 2px solid var(--card);
}

.chat-list-item .status-dot.online {
  background-color: #238636; /* Online */
}

.chat-list-item .chat-info {
  flex-grow: 1;
  min-width: 0; /* Flexbox-da "text-overflow" işləməsi üçün */
}

.chat-info .username {
  text-decoration: none;
  color: var(--text);
}
.chat-info .username:hover {
  color: var(--brand);
}
.avatar-wrapper.profile-nav-link {
  text-decoration: none;
}

.chat-info .last-message {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.last-message .read-status-icon {
  font-size: 0.9rem;
}
.last-message .read-status-icon.seen {
  color: var(--brand);
}

.chat-list-item .meta-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  flex-shrink: 0;
}

.meta-info .unread-badge {
  background-color: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-list-item .chat-id-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(30, 36, 47, 0.7);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
  display: flex; /* YENİ */
  align-items: center; /* YENİ */
  gap: 5px; /* YENİ */
  padding: 3px 6px; /* YENİ */
}
.chat-list-item:hover .chat-id-copy {
  opacity: 0.6;
}
.chat-list-item .chat-id-copy:hover {
  opacity: 1;
  color: var(--brand);
}

.public-project-card .project-preview {
  width: 100%;
  /* aspect-ratio ilə sabit hündürlük təmin edirik */
  aspect-ratio: 16 / 10;
  background-color: #1e242f;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* transition əlavə edirik ki, hündürlük dəyişimi səlis olsun (ehtiyac olarsa) */
  transition: height 0.3s ease;
}

/* iframe-in özünün stili */
.public-project-card .project-preview iframe {
  /* En və hündürlüyü JavaScript təyin edəcək. */
  /* Bu, dinamik ölçüləndirmə üçün daha etibarlıdır. */
  border: none;
  background-color: #fff;
  transform-origin: 0 0; /* Miqyaslamanın yuxarı-sol küncdən başlamasını təmin edir */
  pointer-events: none; /* iframe-in kliklənməsinin qarşısını alır */
}

/* Şəklin stili (artıq mövcuddur, amma yenə də əmin olmaq üçün) */
.public-project-card .project-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .chat-list-item {
    padding: 10px;
    gap: 12px;
  }
  .chat-info .username {
    font-size: 1rem;
  }
  .chat-info .last-message {
    font-size: 0.85rem;
  }
  .meta-info {
    font-size: 0.75rem;
  }
}

/* ==== MOBİL UYĞUNLUQ ==== */

@media (max-width: 1200px) {
  .projects-carousel-track {
    /* Orta ekranlarda kartlar bir az daha böyük görünür */
    grid-auto-columns: 75vw;
  }
}

@media (max-width: 992px) {
  .main-content {
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }
  .editor-stack {
    margin-top: 20px;
    align-self: center;
  }
  .panel {
    flex-direction: column;
    padding: 30px;
    gap: 25px;
  }
  .panel.css {
    flex-direction: column-reverse;
  }
  .panel-img img {
    width: 160px;
  }
  .start-container {
    flex-direction: column;
    text-align: center;
  }
  .start-text {
    flex: 1 1 auto;
  }
  .footer-top {
    text-align: center;
  }
  .footer-links,
  .footer-socials {
    align-items: center;
  }
  .card img {
    margin-top: -15px;
    margin-bottom: 20px;
  }
  .card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #fff;
  }
  .card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.5;
  }
  .projects-carousel-track {
    /* Planşetlərdə tək kart və bir sonrakının kiçik hissəsi görünür */
    grid-auto-columns: 80vw;
  }
}
@media (max-width: 768px) {
  .hamburger-menu {
    display: block;
  }
  .page {
    margin-left: 0 !important;
    width: 100%;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .header {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .search-box {
    order: 2;
    width: 100%;
  }
  .auth-links {
    order: 1;
    flex-grow: 1;
    justify-content: flex-end;
  }
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero-logo {
    width: 100px;
    height: 100px;
    margin-top: 0;
  }
  .hero-text h1 {
    font-size: 32px;
  }
  .hero-text p {
    font-size: 18px;
  }
  .editor-stack {
    width: 100%;
    max-width: 450px;
    height: auto;
    position: static;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .editor-card {
    position: static;
    width: 100%;
    transform: none;
  }
  .code-html,
  .code-css,
  .code-js {
    top: auto;
    left: auto;
    z-index: auto;
  }
  .card img {
    width: 120px;
    height: 120px;
    margin-top: -15px;
    margin-bottom: 20px;
  }
  .card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #fff;
  }
  .card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.5;
  }
  .projects-carousel-wrapper {
    padding: 0;
  }
  .carousel-btn {
    display: none; /* Mobil cihazlarda düymələri tamamilə gizlədirik */
  }

  .projects-carousel-container {
    overflow-x: auto; /* Mobil cihazlarda barmaqla sürüşdürmə (scroll) aktiv olsun */
    scroll-snap-type: x mandatory; /* Sürüşdürməni daha səlis edir */
    scrollbar-width: none;
  }
  .projects-carousel-container::-webkit-scrollbar {
    display: none;
  }
  .projects-carousel-track {
    /* DƏYİŞİKLİK 3: Mobildə yenidən tək sətirə qayıdırıq */
    grid-template-rows: auto;
    /* Kartın enini ekranın 85%-i edirik */
    grid-auto-columns: 85%;
  }
  .public-project-card {
    scroll-snap-align: start; /* Hər kartın sürüşdürmənin başında dayanmasını təmin edir */
  }
}

/* ==== ƏLAQƏ BÖLMƏSİ (CONTACT SECTION) STİLLƏRİ ==== */

.contact-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #161b22, #1a1f28);
  filter: blur(8px);
  z-index: 1;
}

.contact-section h2 {
  font-size: 2.5rem;
  color: #00ff90; /* Əsas brend rənginiz */
  align-items: center;
  margin: 10px;
  text-shadow: 0 0 10px rgba(0, 255, 144, 0.2);
}

.contact-section p.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 40px;
}

.contact-form-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  background: rgba(22, 27, 34, 0.95);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text); /* #e6edf3 */
  font-size: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  margin-bottom: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #00ff90;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background-color: #00ff90;
  color: #000;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.submit-btn:hover {
  background-color: #00cc72;
}

/* Form mesajları */
.form-message {
  margin-top: 15px;
  font-size: 0.95rem;
  color: #00ff90;
}

/* Input və Textarea stilləri */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: var(--card-2); /* #1e242f - Daha tünd input fonu */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

/* Fokus effekti - Headerdəki search-box effekti kimi */
.form-group input:focus,
.form-group textarea:focus {
  border-color: #00ff90;
  box-shadow: 0 0 12px rgba(0, 255, 144, 0.3);
  outline: none;
  background: #242c38;
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* Göndər düyməsi - 'Başla' düyməsi stili ilə uyğun gəlir */
.submit-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;

  /* Brend rəngi ilə gradient */
  background: linear-gradient(90deg, #00ff90, #23d18b);
  color: #0b111a; /* Tünd fon rəngi */
  border: none;
  box-shadow: 0 6px 15px rgba(0, 255, 144, 0.25);
  transition: transform 0.15s ease, opacity 0.3s;
}

.submit-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* Responsive Kiçik Dəyişikliklər */
@media (max-width: 576px) {
  .contact-section {
    padding: 40px 15px;
  }
  .contact-section h2 {
    font-size: 2rem;
  }
  .contact-form-container {
    padding: 20px;
  }
}
@media (max-width: 576px) {
  body {
    font-size: 14px;
  }
  .hero-text h1 {
    font-size: 28px;
  }
  .hero-text p {
    font-size: 16px;
  }
  .btn {
    padding: 14px 28px;
    font-size: 18px;
  }
  .panel-text h3 {
    font-size: 1.5rem;
  }
  .panel-text p {
    font-size: 1rem;
    line-height: 1.6;
  }
  .start-text h2 {
    font-size: 1.8rem;
  }
  .footer-top {
    flex-direction: column;
    align-items: center;
  }
  .footer-about,
  .footer-links,
  .footer-socials {
    flex-basis: auto;
  }
}
@media (max-width: 600px) {
  .contact-section {
    padding: 40px 15px;
  }

  .contact-section h2 {
    font-size: 2rem;
  }
}
