/* =========================================
   AŞK OS (LOVE OS) TEMEL STİLLERİ
   ========================================= */

:root {
    --primary-color: #ff4d6d;
    --secondary-color: #ff758f;
    --bg-color-start: #ffb3c6;
    --bg-color-end: #ffe5ec;
    --text-color: #4a0e1c;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --os-topbar: rgba(255, 255, 255, 0.6);
    --os-dock: rgba(255, 255, 255, 0.4);
}

body.dark-mode {
    --bg-color-start: #0f0c29;
    --bg-color-end: #24243e;
    --primary-color: #bb86fc;
    --secondary-color: #3700b3;
    --text-color: #e0e0e0;
    --glass-bg: rgba(0, 0, 0, 0.6);
    --glass-border: rgba(255, 255, 255, 0.2);
    --os-topbar: rgba(0, 0, 0, 0.5);
    --os-dock: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-color-start) 0%, var(--bg-color-end) 100%);
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Masaüstünde kaydırma olmaz */
    transition: background 1s ease, color 0.5s ease;
    user-select: none;
}

/* =========================================
   YÜKLEME EKRANI (BOOT SCREEN)
   ========================================= */
.loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #050505;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s;
}
.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}
.typing-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    color: #ff4d6d;
    border-right: 3px solid #ff4d6d;
    padding-right: 5px;
    animation: blinkCursor 0.7s infinite;
}
@keyframes blinkCursor {
    50% { border-color: transparent; }
}

/* =========================================
   ARKA PLAN EFEKTLERİ (Kalpler / Yıldızlar)
   ========================================= */
#hearts-container {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.heart {
    position: absolute;
    bottom: -100px;
    background-color: var(--primary-color);
    width: 20px; height: 20px;
    transform: rotate(-45deg);
    animation: float 6s ease-in infinite;
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
}
.heart::before, .heart::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
}
.heart::before { top: -10px; left: 0; }
.heart::after { top: 0; left: 10px; }

@keyframes float {
    0% { transform: translateY(0) rotate(-45deg) scale(0.8); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translateY(-50vh) rotate(-45deg) scale(1.2); }
    100% { transform: translateY(-100vh) rotate(-45deg) scale(1); opacity: 0; }
}

body.dark-mode .heart {
    background-color: transparent;
    box-shadow: 0 0 10px #fff, 0 0 20px #fff;
    width: 4px; height: 4px;
    border-radius: 50%;
    transform: none;
    animation: floatStars 8s linear infinite;
}
body.dark-mode .heart::before, body.dark-mode .heart::after { display: none; }
@keyframes floatStars {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* =========================================
   AŞK OS MASAÜSTÜ ARAYÜZÜ
   ========================================= */
.desktop-environment {
    position: relative;
    width: 100vw; height: 100vh;
    z-index: 10;
}

/* Üst Menü Çubuğu */
.top-bar {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 30px;
    background: var(--os-topbar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
}
.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.menu-item { cursor: pointer; }
.menu-item.bold { font-weight: bold; }
.menu-item:hover { opacity: 0.7; }
.theme-toggle-text {
    cursor: pointer;
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Masaüstü İkonları */
.desktop-icons {
    position: absolute;
    top: 50px; left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 150px);
    flex-wrap: wrap;
    align-content: flex-start;
}
.desktop-icon {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
}
.desktop-icon:hover .icon-img {
    background: rgba(255,255,255,0.3);
    border: 1px solid var(--glass-border);
}
.desktop-icon .icon-img {
    font-size: 2.5rem;
    width: 60px; height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    background: transparent;
    transition: background 0.2s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.desktop-icon .icon-text {
    color: white;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-weight: 600;
    margin-top: 5px;
}

/* =========================================
   PENCERELER (WINDOWS)
   ========================================= */
.os-window {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* transition: transform 0.2s, opacity 0.2s; - Sürüklerken gecikme yapmaması için JS'de halledeceğiz */
}
.os-window.active-window {
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.8);
}
.window-header {
    height: 30px;
    background: rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: grab;
    position: relative;
}
.window-header:active {
    cursor: grabbing;
}
.window-controls {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 15px;
}
.win-btn {
    width: 16px; height: 16px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
}
.win-btn:hover {
    transform: scale(1.2);
}
.win-btn.close { background: #ff5f56; }
.win-btn.minimize { background: #ffbd2e; }
.win-btn.maximize { background: #27c93f; }

.window-title {
    width: 100%;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    pointer-events: none;
    color: var(--text-color);
}
.window-content {
    flex: 1;
    position: relative;
    user-select: text; /* İçerik seçilebilir olsun */
}
/* Scrollbar */
.window-content::-webkit-scrollbar { width: 8px; }
.window-content::-webkit-scrollbar-track { background: transparent; }
.window-content::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }

/* =========================================
   ALT MENÜ (DOCK)
   ========================================= */
.dock-container {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none; /* Dışarıya tıklanabilsin */
    z-index: 2000;
}
.dock {
    background: var(--os-dock);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 10px 15px;
    display: flex;
    gap: 15px;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.dock-icon {
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), margin 0.2s;
    position: relative;
}
.dock-icon:hover {
    transform: scale(1.5) translateY(-10px);
    margin: 0 10px;
    background: rgba(255,255,255,0.4);
}
.dock-label {
    position: absolute;
    top: -35px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.dock-icon:hover .dock-label {
    opacity: 1;
}

/* =========================================
   UYGULAMA İÇİ STİLLER (BİZİM HİKAYEMİZ & DİĞERLERİ)
   ========================================= */
.glass-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
}
.timeline-container { position: relative; max-width: 100%; margin: 20px 0; }
.timeline-line {
    position: absolute; width: 4px; background: var(--primary-color);
    top: 0; bottom: 0; left: 50%; margin-left: -2px; border-radius: 2px;
}
.timeline-item {
    padding: 10px 20px; position: relative; width: 50%;
    opacity: 0; transform: translateY(30px); transition: all 0.6s ease-out;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }
.timeline-item::after {
    content: ''; position: absolute; width: 16px; height: 16px;
    right: -8px; background-color: white; border: 3px solid var(--primary-color);
    top: 20px; border-radius: 50%; z-index: 1;
}
.timeline-item.right::after { left: -8px; }
.timeline-content { padding: 15px; }
.timeline-content h3 { color: var(--primary-color); font-size: 1.1rem; margin-bottom: 5px; }
.timeline-content .date { font-size: 0.8rem; color: var(--secondary-color); font-weight: bold; }

/* Swiper Galeri */
.swiper { width: 100%; padding: 20px 0; }
.swiper-slide {
    width: 250px; height: 350px; border-radius: 10px; overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Müzik Çalar İçeriği */
.player-controls {
    display: flex; align-items: center; gap: 15px;
}
.ctrl-btn {
    background: var(--primary-color); color: white; border: none;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
}
.progress-container {
    flex: 1; height: 8px; background: rgba(0,0,0,0.1); border-radius: 4px; cursor: pointer;
}
.progress-bar { height: 100%; width: 0%; background: var(--primary-color); border-radius: 4px; transition: width 0.1s linear;}
.time-display { font-size: 0.9rem; font-weight: bold; }

/* Butonlar & Inputlar */
.action-btn {
    background: var(--primary-color); color: white; border: none;
    padding: 10px 20px; border-radius: 20px; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 77, 109, 0.3); transition: transform 0.2s;
}
.action-btn:hover { transform: scale(1.05); }
.small-btn { padding: 5px 10px; font-size: 0.8rem; }
.glass-input {
    background: rgba(255,255,255,0.7); border: 1px solid var(--primary-color);
    padding: 8px; border-radius: 15px; outline: none; text-align: center;
}

/* Sürprizler Zarf */
.envelope-wrapper { cursor: pointer; position: relative; width: 180px; height: 120px; transition: transform 0.3s; }
.envelope { width: 100%; height: 100%; background: #e07a8b; position: relative; border-radius: 0 0 10px 10px; }
.envelope::before { content: ''; position: absolute; border-left: 90px solid transparent; border-right: 90px solid transparent; border-bottom: 60px solid #d46375; bottom: 0; z-index: 3; pointer-events: none; }
.envelope::after { content: ''; position: absolute; border-left: 90px solid #ec8b9b; border-right: 90px solid #ec8b9b; border-bottom: 60px solid transparent; border-top: 60px solid transparent; top: 0; z-index: 2; pointer-events: none; }
.envelope-flap { position: absolute; border-left: 90px solid transparent; border-right: 90px solid transparent; border-top: 70px solid #e07a8b; top: 0; z-index: 4; transform-origin: top; transition: transform 0.5s 0.2s; }
.envelope-wrapper.open .envelope-flap { transform: rotateX(180deg); z-index: 1; }
.envelope-letter { position: absolute; bottom: 10px; left: 10px; right: 10px; height: 90px; background: white; padding: 10px; font-size: 0.7rem; border-radius: 5px; z-index: 1; transition: transform 0.5s; display: flex; align-items: center; text-align: center; }
.envelope-wrapper.open .envelope-letter { transform: translateY(-80px); z-index: 2; }

/* Parmak İzi */
.fingerprint-scanner {
    position: relative; width: 60px; height: 80px; border: 2px solid var(--primary-color);
    border-radius: 15px; display: flex; justify-content: center; align-items: center; overflow: hidden; cursor: pointer; background: rgba(255,255,255,0.5);
}
.fingerprint-scanner.scanning { background: rgba(255,77,109,0.2); }
.fingerprint-icon { opacity: 0.5; transition: opacity 0.3s; }
.fingerprint-scanner.scanning .fingerprint-icon { opacity: 1; }
.scan-line { position: absolute; top: -5px; left: 0; width: 100%; height: 3px; background: #4caf50; box-shadow: 0 0 10px #4caf50; opacity: 0; z-index: 2; }
.fingerprint-scanner.scanning .scan-line { opacity: 1; animation: scanAnimation 1.5s infinite linear; }
@keyframes scanAnimation { 0% { top: -5px; } 50% { top: 100%; } 100% { top: -5px; } }

/* --- OYUNLAR & EKLENTİLER --- */
.game-tab-btn {
    flex: 1;
    background: rgba(255,255,255,0.2);
    border: 1px solid var(--primary-color);
    padding: 10px;
    transition: 0.3s;
}
.game-tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    perspective: 1000px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.memory-card {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    cursor: pointer;
}
.memory-card.flip {
    transform: rotateY(180deg);
}
.memory-front, .memory-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.memory-back {
    background: rgba(255, 77, 109, 0.2);
    border: 2px solid var(--primary-color);
}
.memory-front {
    background: var(--primary-color);
    transform: rotateY(180deg);
    color: white;
}

/* --- DEDEKTİF OYUNU STİLLERİ --- */
.evidence-slot.drag-over {
    background: rgba(46, 204, 113, 0.2) !important;
    border-color: #2ecc71 !important;
    transform: scale(1.05);
}
.evidence-slot.filled {
    border-style: solid !important;
    background: rgba(255,255,255,0.8) !important;
    color: #2c3e50 !important;
    font-weight: bold;
}
.evidence-item.dragging {
    opacity: 0.5;
}

/* ====================================================
   📱 MOBİL UYUM (RESPONSIVE DESIGN)
==================================================== */
@media screen and (max-width: 768px) {
    /* Pencereler mobilde tam ekran veya ona yakın olsun */
    .os-window {
        width: 95% !important;
        height: 80% !important;
        top: 5% !important;
        left: 2.5% !important;
        transform: none !important; /* Eğer drag and drop varsa ezsin */
        border-radius: 12px;
    }

    /* Üst menü boyutu küçült */
    .top-bar {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .top-bar .menu-item {
        margin: 0 5px;
    }

    /* Masaüstü İkonları daha küçük olsun */
    .desktop-icons {
        gap: 15px;
        padding: 10px;
    }
    .desktop-icon .icon-img {
        font-size: 2.5rem;
    }
    .desktop-icon .icon-text {
        font-size: 0.8rem;
    }

    /* Dock (Alt Menü) kaydırılabilir olsun ve küçülsün */
    .dock {
        padding: 5px 10px;
        gap: 10px;
        overflow-x: auto;
        justify-content: flex-start;
        max-width: 95vw;
    }
    .dock-icon {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    .dock-label {
        font-size: 0.6rem;
        bottom: -20px;
    }

    /* Çok Gizli İçerikleri (Izgara) tek sütun yap */
    .surprises-grid {
        grid-template-columns: 1fr !important;
    }

    /* Quiz seçenekleri */
    .options-grid {
        grid-template-columns: 1fr;
    }

    /* Şifre Ekranı input genişliği */
    #secret-password-input, #gallery-password-input {
        width: 90% !important;
    }

    /* Kalbi Yakala oyunu yüksekliği */
    #catch-area {
        height: 200px !important;
    }
    #catch-btn {
        left: 50px !important;
        top: 50px !important;
    }

    /* Hafıza oyunu butonları küçülsün */
    .memory-front, .memory-back {
        font-size: 1.5rem;
    }
}
