:root {
    --accent-color: #00d2ff; 
    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255,255,255,0.15);
    --text-main: white;
    --text-muted: rgba(255,255,255,0.8);
    --panel-bg: rgba(20, 20, 20, 0.45); /* Buzlu cam efekti için opaklık 0.45'e düşürüldü */
}

body.light-mode {
    --glass-bg: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255,255,255,0.5);
    --text-main: #222;
    --text-muted: rgba(0,0,0,0.7);
    --panel-bg: rgba(255, 255, 255, 0.45); /* Gündüz modunda da buzlu cam efekti için opaklık düşürüldü */
}

body {
    margin: 0; height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: #111;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    color: var(--text-main); overflow: hidden;
    transition: background 0.8s ease, color 0.5s ease;
}

/* Üst Bar (Grid Sistemi) */
.top-bar {
    position: absolute; top: 0; left: 0; width: 100%;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: 15px 40px; box-sizing: border-box; z-index: 1000;
}

#welcomeArea {
    justify-self: start; font-size: 1.2rem; font-weight: 500;
    background: var(--glass-bg); padding: 8px 20px; border-radius: 20px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.2); transition: all 0.5s;
}

/* Akıllı Arama Çubuğu */
.search-container {
    justify-self: center; display: flex; align-items: center; 
    background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 25px; 
    padding: 8px 20px; width: 450px; max-width: 40vw;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); transition: border-color 0.3s, background 0.3s;
}
.search-container:focus-within { border-color: var(--accent-color); background: rgba(0,0,0,0.6); }
.search-container i { color: var(--accent-color); font-size: 1.1rem; margin-right: 12px; }
#searchInput { flex-grow: 1; background: transparent; border: none; outline: none; color: var(--text-main); font-size: 1.05rem; }
#searchInput::placeholder { color: var(--text-muted); }
body.light-mode .search-container:focus-within { background: rgba(255,255,255,0.6); }

.top-buttons { justify-self: end; display: flex; gap: 15px; }
.action-btn {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-main); font-size: 1.3rem; width: 42px; height: 42px;
    border-radius: 50%; cursor: pointer; transition: all 0.3s;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); 
    display: flex; justify-content: center; align-items: center;
}
.action-btn:hover { background: var(--accent-color); color: #111; transform: translateY(-3px) scale(1.05); }
.action-btn.settings-btn:hover { transform: rotate(90deg); }

/* SERBEST ÇALIŞMA MASASI ALANI */
#desktopContainer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.widget-card, .free-post-it {
    position: absolute; pointer-events: auto; box-shadow: 0 15px 35px rgba(0,0,0,0.3); transition: transform 0.1s; 
}
.widget-card:hover, .free-post-it:hover { transform: translateY(-3px); }
.widget-card:active, .free-post-it:active { transform: scale(0.98); }

/* SİSTEM WIDGET'LARI ÖZEL */
.system-widget {
    background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 25px 35px; border-radius: 30px; border: 1px solid var(--glass-border);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 150px; text-align: center; cursor: grab;
}
.system-widget:active { cursor: grabbing; }
.system-widget:hover { border-color: var(--accent-color); }

.widget-header-handle {
    width: 100%; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed var(--glass-border);
    font-weight: 600; color: var(--accent-color); font-size: 1.1rem; text-align: center; pointer-events: none;
}

/* YAPILACAKLAR LİSTESİ */
#widget-todo { width: 300px; padding: 20px; align-items: flex-start; }
.todo-input-container { display: flex; width: 100%; gap: 8px; margin-bottom: 10px; }
.todo-input-container input { flex-grow: 1; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.3); color: white; outline: none; }
.todo-input-container input:focus { border-color: var(--accent-color); }
.todo-input-container button { background: var(--accent-color); color: #111; border: none; border-radius: 10px; width: 35px; cursor: pointer; transition: 0.2s; }
.todo-input-container button:hover { opacity: 0.8; }

#todoList { list-style: none; padding: 0; margin: 0; width: 100%; max-height: 180px; overflow-y: auto; }
#todoList::-webkit-scrollbar { width: 5px; }
#todoList::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 10px; }
.todo-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.1); padding: 10px 12px; margin-bottom: 6px; border-radius: 10px; transition: 0.2s; }
.todo-item:hover { background: rgba(255,255,255,0.2); }
.todo-item.done span { text-decoration: line-through; opacity: 0.5; }
.todo-item span { flex-grow: 1; cursor: pointer; text-align: left; }
.todo-item i { color: #ff4757; cursor: pointer; padding-left: 10px; transition: 0.2s; }
.todo-item i:hover { transform: scale(1.2); }

/* MEDYA OYNATICI */
#widget-media { width: 320px; padding: 20px; }
#mediaContainer { width: 100%; height: 152px; border-radius: 12px; overflow: hidden; display: flex; justify-content: center; align-items: center;}

/* SERBEST POST-IT */
.free-post-it { border-radius: 5px 25px 5px 25px; box-shadow: 5px 10px 20px rgba(0,0,0,0.4); color: #222; padding: 15px; display: flex; flex-direction: column; width: 250px; height: 250px; cursor: grab; }
.free-post-it:active { cursor: grabbing; }
.note-yellow { background: #fdfd96; } .note-pink { background: #ffb7b2; } .note-green { background: #b5ead7; } .note-blue { background: #c7ceea; }
.post-it-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 5px; cursor: inherit; }
.post-it-header .fa-thumbtack { color: #d63031; font-size: 1.2rem; transform: rotate(45deg); pointer-events: none; }
.post-it-controls { display: flex; align-items: center; gap: 10px; }
.color-palette { display: flex; gap: 6px; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; cursor: pointer; border: 1px solid rgba(0,0,0,0.2); transition: transform 0.2s; }
.color-dot:hover { transform: scale(1.3); }
.delete-note-btn { color: #555; cursor: pointer; transition: 0.2s; font-size: 1.1rem; }
.delete-note-btn:hover { color: red; transform: scale(1.2); }
.free-post-it textarea { width: 100%; flex-grow: 1; background: transparent; border: none; resize: none; outline: none; font-family: 'Segoe UI', sans-serif; font-size: 1.1rem; color: #222; line-height: 1.5; font-weight: 500; cursor: text; }
.free-post-it textarea::placeholder { color: rgba(0,0,0,0.5); font-style: italic; }

/* Widget İçerikleri */
.date-icon, .weather-icon { font-size: 2.2rem; color: var(--accent-color); margin-bottom: 8px; pointer-events: none;}
#date-day { font-size: 2.2rem; font-weight: bold; line-height: 1; pointer-events: none; }
#date-month { font-size: 1.1rem; color: var(--text-muted); margin-top: 5px; pointer-events: none; }
#time-digital { font-size: 3.5rem; font-weight: bold; line-height: 1; pointer-events: none; }
.weather-temp { font-size: 2.2rem; font-weight: bold; pointer-events: none; }
.weather-city { font-size: 1rem; color: var(--text-muted); margin-top: 5px; pointer-events: none; }

/* Analog Saat */
#time-analog { display: none; width: 90px; height: 90px; border: 4px solid var(--accent-color); border-radius: 50%; position: relative; box-shadow: inset 0 0 15px rgba(0,0,0,0.2); pointer-events: none; }
.hand { position: absolute; bottom: 50%; left: 50%; transform-origin: bottom; border-radius: 4px; }
.hour-hand { width: 4px; height: 22px; background: var(--text-main); transform: translateX(-50%); z-index: 3; }
.min-hand { width: 3px; height: 34px; background: var(--text-muted); transform: translateX(-50%); z-index: 2; }
.sec-hand { width: 2px; height: 40px; background: var(--accent-color); transform: translateX(-50%); z-index: 1; }
.clock-center { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; background: var(--text-main); border-radius: 50%; transform: translate(-50%, -50%); z-index: 4; }

/* İkonlar (Dock) */
.dock {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 15px; padding: 15px 25px; background: var(--glass-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 35px; border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: all 0.5s; z-index: 100;
}
.icon-item {
    width: 55px; height: 55px; background: rgba(150,150,150,0.2);
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    cursor: grab; transition: transform 0.2s, background 0.3s, box-shadow 0.3s; 
    text-decoration: none; color: var(--text-main); font-size: 1.8rem;
}
.icon-item:hover { transform: scale(1.2) translateY(-10px); background: var(--accent-color); color: #111; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.icon-item:active { cursor: grabbing; }
.icon-item.dragging { opacity: 0.5; transform: scale(0.9); border: 2px dashed var(--accent-color); }
.icon-item img { width: 65%; height: 65%; object-fit: contain; pointer-events: none; border-radius: 5px; }

/* Ayarlar Paneli */
#settingsPanel {
    position: fixed; top: 0; right: -450px; width: 400px; height: 100vh;
    background: var(--panel-bg); color: var(--text-main); 
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); /* Panelin arkasını bulanıklaştırır */
    z-index: 2000; box-shadow: -5px 0 25px rgba(0,0,0,0.6);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.5s;
    overflow-y: auto; border-left: 1px solid var(--glass-border); box-sizing: border-box; padding: 30px;
}
#settingsPanel.open { right: 0; }
#settingsPanel::-webkit-scrollbar { width: 8px; }
#settingsPanel::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 10px; }

.panel-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--glass-border); padding-bottom: 15px; margin-bottom: 15px; }
.panel-header h3 { margin: 0; font-size: 1.5rem; }
.close-btn { background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; }
.close-btn:hover { color: var(--accent-color); }

/* --- DÜZELTİLEN KISIM BURASI (H4 BAŞLIKLARI) --- */
h4 { 
    margin-bottom: 10px; 
    color: var(--text-main); /* Tema rengi yerine metin rengini (beyaz) alır */
    margin-top: 20px; 
    border-bottom: 1px dashed var(--glass-border); 
    padding-bottom: 5px;
    font-size: 1.1rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8); /* Buzlu camda belirgin olması için koyu gölge eklendi */
}

input, select { width: 100%; padding: 10px; margin: 5px 0 10px 0; border-radius: 10px; border: 1px solid var(--glass-border); background: rgba(150,150,150,0.2); color: var(--text-main); box-sizing: border-box; outline: none; }
input:focus, select:focus { border-color: var(--accent-color); }
option { background-color: #222; color: #fff; } body.light-mode option { background-color: #fff; color: #222; }
input[type="color"] { padding: 2px; height: 40px; cursor: pointer; }

.btn { background: var(--accent-color); color: #111; font-weight: bold; border: none; padding: 12px 20px; cursor: pointer; border-radius: 10px; width: 100%; transition: opacity 0.2s; }
.btn:hover { opacity: 0.9; }

.icon-form-grid { display: grid; grid-template-columns: 1fr; gap: 5px; }
.icon-list-item { display: flex; justify-content: space-between; align-items: center; background: rgba(150,150,150,0.2); padding: 8px 12px; margin-bottom: 5px; border-radius: 10px; }
.icon-actions { display: flex; gap: 5px; }
.icon-actions .edit-btn { background: #f39c12; color: white; border: none; padding: 6px 10px; border-radius: 5px; cursor: pointer; transition: 0.2s; }
.icon-actions .edit-btn:hover { background: #e67e22; }
.icon-actions .delete-btn { background: #ff4757; color: white; border: none; padding: 6px 10px; border-radius: 5px; cursor: pointer; transition: 0.2s; }
.icon-actions .delete-btn:hover { background: #ff6b81; }
.list-icon-img { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin-right: 8px; border-radius: 3px; }