/* Modern ve siyah tema için güncellenmiş CSS */

html, body {
    margin: 0;
    padding: 0;
    height: 100%; /* Sayfanın tamamını kapsaması için */
    overflow-y: scroll; /* Dikey kaydırma çubuğunu etkinleştir */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Sayfanın tamamını kapsaması için */
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #121212; /* Siyah arka plan */
    color: #f5f5f5; /* Beyaz metin */
    line-height: 1.6;
    overflow-y: auto; /* Sayfanın kaydırılabilir olmasını sağlar */
    height: auto; /* Tüm ekran yüksekliği yerine içeriğe göre ayarlanır */
    background-size: cover;
}

body.gif-bg {
    background: url('Assets/starwars.gif') no-repeat center center fixed;
    background-size: cover;
}

/* === Genel Buton Stili === */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px; /* Tamamen yuvarlak kenarlar */
    background-color: rgba(255, 255, 255, 0.1); /* Yarı saydam beyaz */
    color: #f5f5f5;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px); /* BUZLU CAM EFEKTİ */
    -webkit-backdrop-filter: blur(10px); /* Safari için */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px); /* Hafif yukarı kalkma efekti */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* === Header Stilleri === */
header {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header img {
    width: 100px; /* Görselin genişliğini küçült */
    height: 75px; /* Görselin yüksekliğini küçült */
    border-radius: 50%;
    margin-right: 15px; /* Görsel ile yazı arasındaki boşluğu küçült */
}

header h1 {
    font-size: 28px; /* Başlık yazı boyutunu küçült */
    margin: 0;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

header nav a {
    color: #f5f5f5;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Geri Dön Butonu */
header button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7); /* Beyaz yarı saydam arka plan */
    color: #121212;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

header button:hover {
    background-color: rgba(255, 255, 255, 0.8); /* Hover durumunda daha opak */
}

/* Header'daki bağlantılar */
header a {
    text-decoration: none; /* Alt çizgiyi kaldır */
    color: white; /* Yazı rengini beyaz yap */
    background-color: transparent; /* Tamamen şeffaf arka plan */
    padding: 5px 10px; /* İç boşluk ekle */
    border: 2px solid rgba(255, 255, 255, 0.5); /* Yarı saydam beyaz çerçeve */
    border-radius: 5px; /* Köşeleri yuvarlat */
    transition: color 0.3s ease, border-color 0.3s ease; /* Hover animasyonu */
}

header a:hover {
    color: rgba(255, 255, 255, 0.8); /* Hover durumunda yazı rengini daha opak yap */
    border-color: rgba(255, 255, 255, 0.8); /* Çerçeve rengini daha opak yap */
}

nav {
    background-color: rgba(0, 0, 0, 0.7); /* Siyah yarı saydam arka plan */
    padding: 10px 0;
    color: white;
    display: flex;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

nav ul {
    display: flex; /* Butonları yan yana hizalar */
    justify-content: center; /* Ortalar */
    gap: 15px; /* Butonlar arasında boşluk */
    list-style: none; /* Liste işaretlerini kaldırır */
    padding: 0; /* Varsayılan padding'i kaldırır */
    margin: 0; /* Varsayılan margin'i kaldırır */
}

/* Nav içindeki bağlantılar */
nav a {
    text-decoration: none;
    color: white;
    background-color: transparent; /* Tamamen şeffaf arka plan */
    padding: 10px 15px; /* İç boşluk ekle */
    border: 2px solid rgba(255, 255, 255, 0.5); /* Yarı saydam beyaz çerçeve */
    border-radius: 5px; /* Köşeleri yuvarlat */
    transition: color 0.3s ease, border-color 0.3s ease; /* Hover animasyonu */
}

nav a:hover {
    color: rgba(255, 255, 255, 0.8); /* Hover durumunda yazı rengini daha opak yap */
    border-color: rgba(255, 255, 255, 0.8); /* Çerçeve rengini daha opak yap */
}

/* Main */
main {
    flex: 1; /* İçeriği esnek yapar ve sayfanın geri kalanını kaplar */
    padding: 20px 40px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto; /* İçeriği ortala */
    background-color: rgba(0, 0, 0, 0.7); /* Beyaz yarı saydam arka plan */
    border-radius: 8px; /* Köşeleri yuvarlat */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Hafif gölge ekle */
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.7); /* Siyah yarı saydam arka plan */
    color: white;
    padding: 10px;
    text-align: center;
    margin-top: 20px; /* Footer ile içerik arasında boşluk */
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.5);
    font-size: 14px; /* Footer yazı boyutunu küçült */
}

button {
    background-color: transparent; /* Şeffaf arka plan */
    color: #f5f5f5;
    border: 2px solid #f5f5f5; /* Beyaz çerçeve */
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block; /* Butonları yan yana hizalamak için */
    margin: 5px; /* Butonlar arasında boşluk */
}

button:hover {
    background-color: #f5f5f5;
    color: #121212; /* Siyah metin */
}

/* Modal Arka Plan */
.modal {
    display: none; /* Varsayılan olarak gizli */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Yarı saydam siyah arka plan */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Modal İçerik */
.modal-content {
    background-color: #fff; /* Beyaz arka plan */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

/* Kapatma Butonu */
.modal-content .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-content .close:hover {
    color: #ff0000; /* Hover durumunda kırmızı */
}

/* Sosyal Medya İkonları */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.social-icon span {
    font-size: 14px;
    font-weight: bold;
}

.social-icon:hover {
    transform: scale(1.1); /* Hover durumunda büyütme */
    color: #0073e6; /* Hover durumunda mavi renk */
}

social-icon:hover img {
    transform: rotate(10deg); /* Hover durumunda hafif döndürme */
}

#cursorFollower {
    position: absolute; /* Görselin serbestçe hareket etmesi için */
    pointer-events: none; /* Fare tıklamalarını engeller */
    z-index: 1000; /* Üstte görünmesi için */
}

canvas#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1;
    display: block;
}

#cursorFollower img {
    width: 150px; /* Yeni genişlik */
    height: 150px; /* Yeni yükseklik */
}

#videoGallery {
    text-align: center;
    padding: 20px;
    padding-bottom: 100px; /* Alt kısma ekstra boşluk ekler */
}

/* Video Container */
.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Duyarlı grid yapısı */
    gap: 30px;
    margin-bottom: 50px;
}

.video-container iframe {
    width: 100%;
    height: 315px;
    border-radius: 15px; /* Videolara yuvarlak kenar */
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-container iframe:hover {
    transform: scale(1.05); /* Videonun üzerine gelince büyüme efekti */
    box-shadow: 0 15px 40px rgba(211, 84, 0, 0.4); /* Ana renkle gölge */
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, #ff7eb3, #ff758c, #ff6a65, #ff5e3a);
    background-size: 800% 800%;
    z-index: -1; /* İçeriklerin arkasında kalması için */
    animation: gradientAnimation 10s ease infinite;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* İçeriklerin arkasında kalması için */
}

#backgroundVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1; /* İçeriklerin arkasında kalması için */
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Projects Section */
#projects {
    display: grid;
    /* Kartların minimum genişliğini biraz düşürerek daha fazlasının sığmasını sağla */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px; /* Kartlar arası boşluğu azalt */
    padding: 20px 0;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.project-images {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.project-images::-webkit-scrollbar {
    height: 6px; /* Kaydırma çubuğunu incelt */
}

.project-images::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.project-images img {
    width: 100%;
    height: 200px; /* FOTOĞRAF YÜKSEKLİĞİNİ KÜÇÜLTTÜK */
    object-fit: cover;
    scroll-snap-align: center;
    flex-shrink: 0;
}

.project-info {
    padding: 20px; /* İç boşlukları ayarla */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    margin-top: 0;
    font-size: 24px; /* Başlık boyutunu ayarla */
    margin-bottom: 10px;
}

.project-info p {
    color: #ccc;
    flex-grow: 1;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-info .btn {
    align-self: flex-start;
    background-color: rgba(211, 84, 0, 0.7);
    border: none;
}

.project-info .btn:hover {
    background-color: rgba(211, 84, 0, 1);
}

/* Class Notes Butonu */
.class-notes-button {
    display: inline-block; /* Buton gibi görünmesi için */
    text-decoration: none; /* Alt çizgiyi kaldır */
    color: white; /* Yazı rengini beyaz yap */
    background-color: #0073e6; /* Mavi arka plan */
    padding: 10px 20px; /* İç boşluk ekle */
    border-radius: 5px; /* Köşeleri yuvarlat */
    font-size: 16px; /* Yazı boyutunu ayarla */
    font-weight: bold; /* Yazıyı kalın yap */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Hover animasyonu */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Hafif gölge ekle */
}

.class-notes-button:hover {
    background-color: #005bb5; /* Hover durumunda daha koyu mavi */
    transform: translateY(-2px); /* Hover durumunda yukarı kaldır */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3); /* Hover durumunda gölgeyi büyüt */
}

.class-notes-button:active {
    transform: translateY(0); /* Tıklama durumunda eski konuma getir */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Tıklama durumunda gölgeyi küçült */
}

.answer {
  margin-top: 5px;
  color: #333;
  transition: opacity 0.3s ease;
}

.cursor-trail {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  /* Eğer farklı bir görsel/gif kullanmak istersen yukarıdaki JS'de url'yi değiştir */
}

/* === Genişletilmiş Proje Kartı Stilleri (YENİ VERSİYON) === */

/* Animasyonların pürüzsüz olması için temel elemanlara transition ekleyelim */
.project-card, .project-images, .project-info p, .project-images img {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Genişletilmiş kartın kendisi */
.project-card.expanded {
    /* Geniş ekranlarda iki sütunluk yer kapla */
    grid-column: span 2;
    transform: translateY(0); /* Hover efektini sıfırla */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); /* Daha belirgin gölge */
}

/* Genişletilmiş kartın resim alanı */
.project-card.expanded .project-images {
    height: 400px; /* Resim yüksekliğini daha da artır */
    background-color: rgba(0, 0, 0, 0.2); /* Resimlerin arkası için hafif bir arka plan */
}

/* Genişletilmiş karttaki resimlerin kendisi */
.project-card.expanded .project-images img {
    object-fit: contain; /* RESMİN TAMAMINI GÖSTER, KIRPMAYI ENGELLE */
    height: 100%; /* Konteynerin yüksekliğine tam uyum sağla */
}

/* Genişletilmiş kartın açıklama metni */
.project-card.expanded .project-info p {
    font-size: 1.1em; /* Yazı tipini biraz büyüt */
}

/* Mobil ve daha dar ekranlar için (tek sütun düzeni) */
@media (max-width: 850px) {
    .project-card.expanded {
        grid-column: span 1; /* Tek sütun kaplamaya devam et */
    }
}

/* === Games section styles === */
.games-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.games-section h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 24px;
  color: #fff;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  align-items: stretch;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.game-card:hover, .game-card:focus {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}
.game-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
/* fallback thumbnails (kendi görsellerinle değiştir) */
.pong-thumb {
  background: linear-gradient(135deg,#0f1724,#0b3b2e);
  /* veya: background-image: url('Assets/Games/pong-thumb.png'); */
}
.rps-thumb {
  background: linear-gradient(135deg,#2a1036,#3b2a6a);
  /* veya: background-image: url('Assets/Games/rps-thumb.png'); */
}
.game-info {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-info h3 {
  margin: 0;
  font-size: 18px;
}
.game-info p {
  margin: 0;
  color: #cfcfcf;
  font-size: 14px;
  flex-grow: 1;
}
.game-card .btn {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  background: linear-gradient(90deg,#d35400,#ff7b3a);
  color: #fff;
  margin-top: 8px;
}
/* Küçük ekran ayarları */
@media (max-width: 520px) {
  .game-info p { font-size: 13px; }
  .games-section { padding: 24px 12px; }
}

/* === Games modal styles === */
.modal-games {
  display: none; /* hidden by default */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-games[aria-hidden="false"] {
  display: flex;
}

.modal-content-games {
  width: 100%;
  max-width: 920px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  position: relative;
  overflow: hidden;
}

.modal-content-games h2 {
  margin: 0 0 14px 0;
  color: #fff;
  font-size: 22px;
}

.modal-close.close-games {
  position: absolute;
  right: 12px;
  top: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.game-item {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  transition: transform .18s ease, box-shadow .18s ease;
  align-items: center;
}
.game-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.5);
}

.game-thumb {
  width: 110px;
  height: 70px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* fallback gradients or replace with background-image url(...) */
.pong-thumb { background: linear-gradient(135deg,#0f1724,#0b3b2e); }
.rps-thumb  { background: linear-gradient(135deg,#2a1036,#3b2a6a); }

.game-meta h3 { margin: 0; font-size: 16px; }
.game-meta p  { margin: 4px 0 0 0; color: #cfcfcf; font-size: 13px; }

/* small screens */
@media (max-width: 520px) {
  .modal-content-games { padding: 12px; }
  .game-thumb { width: 90px; height: 56px; }
  .game-meta h3 { font-size: 15px; }
}