/* ============================================
   TEMA TOGGLE BUTONU
   ============================================ */
#theme-toggle {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4b7bec, #3867d6);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(56,103,214,0.5);
    /* Z-index değerini en yüksek yaparak diğer elementlerin altında kalmasını önlüyoruz */
    z-index: 999999 !important; 
    font-size: 22px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    /* display ve visibility değerleri butonun her zaman çizilmesini sağlar */
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
}

#theme-toggle:hover {
    transform: scale(1.15) rotate(20deg);
    box-shadow: 0 0 30px rgba(122,179,255,0.7);
}

#theme-toggle:active {
    transform: scale(0.9);
}

/* ============================================
   SAYFA GECİS OVERLAY
   ============================================ */
#page-transition {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #3867d6, #181a20);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
#page-transition.active {
    opacity: 1;
    pointer-events: all;
}
#page-transition::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinLoader 0.7s linear infinite;
}

/* ============================================
   TEMA GECIS RIPPLE
   ============================================ */
.theme-ripple {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122,179,255,0.2) 0%, transparent 70%);
    transform: scale(0);
    animation: themeRippleAnim 0.7s ease-out forwards;
    pointer-events: none;
    z-index: 9998;
}


.aycicegi-resmi {
    width: 620px;       /* resim genişliğini piksel ile sınırla */
    max-width: 90%;     
    height: auto;       /* oranı korur */
    border-radius: 12px;
    display: block;
    margin: 0 auto;     /* ortalar */
}




/* ============================================
   BODY & TEMEL STILLER tema değişim süresi
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: #181a20;
    color: #e8e8e8;
    overflow-x: hidden;
    animation: pageFadeSlide 0.5s ease-out both;
}

/* ============================================
   LIGHT MODE
   ============================================ */
body.light-mode {
    background: #f0f4f8; /* sayfa arka plan rengi */
    color: #1a1c24; /* ana yazı rengi */
}
body.light-mode .cursor-glow { opacity: 0; } /* imleç parlamasını kapat */
body.light-mode header { background: linear-gradient(135deg, #3867d6, #2e49b8); } /* üst kısmın geçişli rengi */
body.light-mode nav { background: #ffffff; border-bottom: 1px solid #dde3ec; } /* menü arka planı ve alt çizgisi */
body.light-mode nav a { color: #3867d6; } /* menü linklerinin rengi */
body.light-mode nav a:hover { color: #1a3a8f; text-shadow: none; } /* üzerine gelince link rengi ve gölgeyi sil */
body.light-mode h2 { color: #2e49b8; } /* büyük başlık rengi */
body.light-mode h3 { color: #1a2e6e; } /* orta boy başlık rengi */
body.light-mode p, body.light-mode li { color: #333; } /* metin ve liste rengi */
body.light-mode .yazi { background: #ffffff; border-color: #c5d5f0; } /* yazı kutusu rengi ve kenarlığı */
body.light-mode .yazi h3 { color: #2e49b8; } /* yazı kutusu başlık rengi */
body.light-mode .yazi p { color: #444; } /* yazı kutusu metin rengi */
body.light-mode .yazi:hover, body.light-mode .foto:hover {
    box-shadow: 0 0 25px rgba(56,103,214,0.3); /* üzerine gelince oluşan gölge */
    border-color: #3867d6; /* üzerine gelince çerçeve rengi */
}

body.light-mode .yazi a {
    color: #2e49b8 !important; /* link rengi zorunlu */
    font-weight: 600; /* yazı kalınlığı */
    text-decoration: underline; /* altı çizili yap */
}

body.light-mode .foto { background: #ffffff; border-color: #c5d5f0; } /* resim kutusu ve kenarlığı */
body.light-mode .foto h3 { color: #2e49b8; } /* resim başlık rengi */
body.light-mode .foto p { color: #444; } /* resim alt yazı rengi */
body.light-mode .duyuru-kutu, body.light-mode .hafta-kutu {
    background: #ffffff !important; /* duyuru kutusu rengi */
    border-color: #c5d5f0 !important; /* duyuru kenarlık rengi */
    color: #1a1c24 !important; /* duyuru yazı rengi */
    box-shadow: 0 2px 10px rgba(56,103,214,0.08); /* hafif gölge */
}
body.light-mode .duyuru-baslik { color: #3867d6 !important; } /* duyuru başlığı rengi */
body.light-mode .duyuru-kutu p { color: #333 !important; } /* duyuru metni rengi */
body.light-mode footer { background: #ffffff; border-top: 1px solid #dde3ec; color: #555; } /* alt kısım rengi ve çizgisi */
body.light-mode .modal-icerik { background: #ffffff; color: #1a1c24; border-color: #3867d6; } /* açılır pencere tasarımı */
body.light-mode pre { background: #e8edf5; color: #1a2e6e; border-left-color: #3867d6; } /* kod alanı zemini ve yan şeridi */
body.light-mode .card { background: #ffffff; border-color: #c5d5f0; } /* kart yapısı zemini ve kenarlığı */
body.light-mode .card h3 { color: #2e49b8; } /* kart başlık rengi */
body.light-mode .card p { color: #444; } /* kart metin rengi */
body.light-mode ul li:hover { color: #2e49b8; } /* listenin üstüne gelince renk değişimi */
body.light-mode #page-transition { background: linear-gradient(135deg, #3867d6, #e8f0ff); } /* sayfa geçiş efekti rengi */

/* ana metin renklerini daha koyu yaparak kontrastı artırdık */
body.light-mode p, 
body.light-mode li { 
    color: #1a1c24; /* koyu metin rengi */
    line-height: 1.6; /* satır aralığı boşluğu */
}

/* başlıkları daha "tok" ve belirgin hale getirdik */
body.light-mode h2 { 
    color: #1a3a8f; /* büyük başlık lacivert tonu */
    font-weight: 800; /* çok kalın yazı */
}

body.light-mode h3 { 
    color: #0f1c4d; /* orta başlık koyu lacivert */
    font-weight: 700; /* kalın yazı */
}

/* kutu içindeki yazıların grileşmesini engelleyip netleştirdik */
body.light-mode .yazi p, 
body.light-mode .foto p, 
body.light-mode .card p { 
    color: #2d3436 !important; /* kutu içi net metin rengi */
    font-weight: 450; /* orta seviye yazı kalınlığı */
}

/* duyuru kutusu metinleri */
body.light-mode .duyuru-kutu p { 
    color: #1a1c24 !important; /* duyuru yazısı netleştirme */
    font-weight: 500; /* belirgin yazı kalınlığı */
}

/* kod blokları (pre) içindeki yazıların okunurluğu */
body.light-mode pre { 
    background: #f8faff; /* kod alanı açık zemin */
    color: #000000; /* kodların siyah rengi */
    border: 1px solid #c5d5f0; /* kod alanı çerçevesi */
    border-left: 5px solid #3867d6; /* kod alanı sol kalın çizgi */
}

/* linklerin belirginliği */
body.light-mode .yazi a {
    color: #2549b8 !important; /* link rengi vurgusu */
    font-weight: 700; /* kalın link yazısı */
    text-decoration: underline; /* altını çiz */
    text-underline-offset: 3px; /* alt çizgi ile yazı arası boşluk */
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: linear-gradient(135deg, #4b7bec, #3867d6);
    padding: 55px 20px;
    text-align: center;
    color: ;
    border-bottom: 3px solid #2e49b8;
    position: relative;
    overflow: hidden;
}
header::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(ellipse at 60% 40%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}
header h1 {
    position: relative;
    z-index: 1;
    animation: slideDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
header p {
    position: relative;
    z-index: 1;
    animation: slideDown 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
    opacity: 0.9;
}

/* ============================================
   NAV
   ============================================ */
nav {
    text-align: center;
    background: #20222a;
    padding: 15px;
    border-bottom: 1px solid #2d2f37;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    animation: fadeIn 0.7s ease-out both;
}
nav a {
    color: #82b7ff;
    font-weight: 700;
    text-decoration: none;
    margin: 0 15px;
    display: inline-block;
    position: relative;
    transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #82b7ff;
    border-radius: 2px;
    transition: width 0.3s ease, left 0.3s ease;
    box-shadow: 0 0 8px #82b7ff;
}
nav a:hover {
    color: #bcd6ff;
    text-shadow: 0 0 12px #82b7ff;
    transform: translateY(-2px);
}
nav a:hover::after {
    width: 100%;
    left: 0;
}

/* ============================================
   MODAL
   ============================================ */
#projeacilirpencere, .pencere {
    display: none;      
    position: fixed;    
    z-index: 999999;    
    left: 0;
    top: 0;
    width: 100vw;       /* Sayfa genişliği değil, ekran genişliği */
    height: 100vh;      /* Sayfa yüksekliği değil, ekran yüksekliği */
    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(8px);           
    align-items: center; 
    justify-content: center;
}
.pencere.acik {
    display: flex;
}
.pencere-icerik {
    background: #181a20;
    color: #fff;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(122, 179, 255, 0.4);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;   /* İçerik ekrana sığmazsa taşmasın */
    overflow-y: auto;   /* İçerik çok uzunsa kendi içinde scroll olsun */
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.pencere-kapat {
    color: #ff4d4d;
    float: right;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s;
}
.pencere-kapat:hover {
    transform: rotate(90deg) scale(1.2);
    color: #ff8080;
}

/* ============================================
   HERO
   ============================================ */
.bannerresmi {
    text-align: center;
    padding: 35px;
}
.bannerresmi img {
    width: 55%;
    max-width: 850px;
    border-radius: 20px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.55);
    animation: glowFloat 9s ease-in-out infinite, fadeIn 1s ease-out;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.bannerresmi img:hover {
    transform: scale(1.04) translateY(-6px);
    box-shadow: 0 20px 50px rgba(122,179,255,0.35);
}

/* ============================================
   SECTION başlık çizgisi
   ============================================ */
.section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: auto;
}
h2 {
    color: #7ab3ff;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4b7bec, #7ab3ff, #4b7bec);
    border-radius: 3px;
    margin: 8px auto 0;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(122,179,255,0.4);
}
.section:hover h2::after {
    width: 180px;
}

/* ============================================
   KARTLAR — FOTO & YAZI
   ============================================ */
.foto-container, .yazi-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
}
.yazi, .foto {
    width: 270px;
    border-radius: 20px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}
.yazi { background: #3a3d46; border: 1px solid #4a4d57; }
.foto { background: #31343d; border: 1px solid #464a55; }

.foto::before, .yazi::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(122,179,255,0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.foto:hover::before, .yazi:hover::before { opacity: 1; }

.foto:hover, .yazi:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 25px #7ab3ff, 0 0 50px rgba(122,179,255,0.2);
    border-color: #7ab3ff;
}
.foto img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.4s ease;
}
.foto:hover img { transform: scale(1.06); }


/* ============================================
   FOTOĞRAF GÖRÜNTÜLEME BUTONU (.foto-btn)
   ============================================ */
.foto-btn {
    background: rgba(122, 179, 255, 0.1);
    border: 1px solid #7ab3ff;
    color: #7ab3ff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.foto-btn:hover {
    background: #7ab3ff;
    color: #181a20;
    box-shadow: 0 4px 15px rgba(122, 179, 255, 0.4);
    transform: translateY(-3px);
}

.foto-btn:active {
    transform: translateY(0) scale(0.95);
}

/* --- LIGHT MODE İÇİN FOTO BUTON AYARLARI --- */
body.light-mode .foto-btn {
    background: rgba(56, 103, 214, 0.1);
    border-color: #3867d6;
    color: #3867d6;
}

body.light-mode .foto-btn:hover {
    background: #3867d6;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(56, 103, 214, 0.3);
}


/* ============================================
   CARD (ozhansiraaykimdir sayfasi)
   ============================================ */
.card-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
}
.card {
    width: 250px;
    background: #31343d;
    border: 1px solid #464a55;
    border-radius: 20px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 25px #7ab3ff, 0 0 50px rgba(122,179,255,0.2);
    border-color: #7ab3ff;
}
.card img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.4s;
}
.card:hover img { transform: scale(1.08); }

/* Efektin kutu dışına taşmasını engeller */
.proje-kart, .islem-buton, .copy-btn, .foto, .card, .duyuru-kutu {
    position: relative !important;
    overflow: hidden !important; 
}

/* Dalgalanma efektinin tasarımı */
.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3); 
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none; 
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Her iki sayfada da butonun aynı görünmesi için */
.islem-buton {
    background: #007acc;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    display: inline-block;
    margin-top: 15px;
    text-transform: uppercase;
}

.islem-buton:hover {
    background: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 204, 0.4);
}

/* Oyun alanının genişliğini sabitleyelim */
.puzzle-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   DUYURU KUTULARI
   ============================================ */
.duyuru-kutu, .hafta-kutu {
    background: rgba(255,255,255,0.06) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}
.duyuru-kutu:hover {
    transform: translateX(6px);
    border-color: rgba(122,179,255,0.4);
    box-shadow: -4px 0 20px rgba(122,179,255,0.12);
}
.duyuru-baslik {
    font-weight: 700;
    color: #7ab3ff !important;
    margin-bottom: 8px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 25px;
    background: #20222a;
    border-top: 1px solid #2c2e38;
    color: #ccc;
    border-radius: 20px 20px 0 0;
    transition: box-shadow 0.4s;
}
footer:hover {
    box-shadow: 0 -8px 35px rgba(56,103,214,0.15);
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal-item {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-item.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   LINKLER
   ============================================ */
a {
    color: #82b7ff;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}
a:hover {
    color: #bcd6ff;
    text-shadow: 0 0 8px rgba(122,179,255,0.5);
}

/* ============================================
   RIPPLE TIKLAMA EFEKTI
   ============================================ */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(122,179,255,0.3);
    transform: scale(0);
    animation: rippleAnim 0.6s linear;
    pointer-events: none;
}

.puzzle-wrapper { display: flex; gap: 20px; justify-content: center; padding: 20px; }
.drag-zone { width: 200px; display: flex; flex-direction: column; gap: 10px; background: #252526; padding: 15px; border-radius: 8px; }

.drag-item {
    background: #007acc; color: white; padding: 8px; border-radius: 4px;
    cursor: grab; text-align: center; font-family: monospace; font-weight: bold;
}

.code-editor {
    background: #1e1e1e; color: #d4d4d4; padding: 20px; border-radius: 8px;
    font-family: 'Consolas', monospace; border: 1px solid #333; min-width: 400px;
    text-align: left; position: relative;
}

.drop-slot {
    display: inline-block; min-width: 60px; height: 22px;
    background: #333; border-bottom: 2px solid #007acc;
    color: #ce9178; cursor: pointer; text-align: center;
}

.drop-slot.active { border: 2px dashed #ffc107; }

#feedback-area { margin-top: 15px; font-weight: bold; font-size: 1.1rem; }

/* ============================================
   PRE BLOK
   ============================================ */
pre {
    background: #1e2128;
    color: #7ab3ff;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3867d6;
    overflow-x: auto;
    transition: box-shadow 0.3s;
}
pre:hover {
    box-shadow: 0 0 20px rgba(56,103,214,0.3);
}

/* ============================================
   LISTE HOVER
   ============================================ */
ul li {
    transition: transform 0.25s ease, color 0.25s ease;
    cursor: default;
}
ul li:hover {
    transform: translateX(6px);
    color: #82b7ff;
}

/* ============================================
   ANIMASYONLAR
   ============================================ */
@keyframes pageFadeSlide {
    0%  { opacity: 0; transform: translateY(18px); }
    100%{ opacity: 1; transform: none; } /* translateY(0) yerine none yazıyoruz */
}
@keyframes fadeUp {
    0%  { opacity: 0; transform: translateY(25px); }
    100%{ opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideDown {
    0%  { opacity: 0; transform: translateY(-40px); }
    100%{ opacity: 1; transform: translateY(0); }
}
@keyframes slideFromLeft {
    0%  { opacity: 0; transform: translateX(-35px); }
    100%{ opacity: 1; transform: translateX(0); }
}
@keyframes glowFloat {
    0%  { transform: translateY(0);    filter: brightness(1);    }
    50% { transform: translateY(-8px); filter: brightness(1.06); }
    100%{ transform: translateY(0);    filter: brightness(1);    }
}
@keyframes pageFade {
    0%  { opacity: 0; }
    100%{ opacity: 1; }
}
@keyframes modalAcilis {
    0%  { opacity: 0; transform: scale(0.7) translateY(-30px); }
    100%{ opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes spinLoader {
    to { transform: rotate(360deg); }
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}
@keyframes themeRippleAnim {
    from { transform: scale(0); opacity: 1; }
    to   { transform: scale(80); opacity: 0; }
}
@keyframes headerShimmer {
    0%,100%{ transform: rotate(0deg)  scale(1);   }
    50%    { transform: rotate(15deg) scale(1.1); }
}