body {
    font-family: 'Calibri', sans-serif;
    margin: 20px;
    background: radial-gradient(circle at 30% 20%, #abb9dd, #f9fbfd 50%, #ffffff 100%);
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: cover;
    text-align: center;
    transition: background 0.3s, color 0.3s;        
}

.container {
    font-family: 'Calibri', sans-serif;
    max-width: 1280px;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.3s, color 0.3s;
}

h2 {
    color: #333;
    transition: color 0.3s;
}

/* Dark tema renkleri */
body.dark {
    background: radial-gradient(circle at 30% 20%, #3a3542, #1d262f 70%);
    color: #f2f2f2ce;
}

.container.dark {
    background: #191f28bf;
    max-width: 1280px;
}

h2.dark {
    color: #f2f2f2ce;
}

/* Buton Stili */
button {
    background: #405a77;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #405a77;
}

#toggleBtn {
    text-decoration: underline;
}

/* Şablonlar Grid Sistemi */
.templates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    max-width: 1280px;
    gap: 10px;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
}

/* saat style */
#clockButton {
    background: linear-gradient(#405a7700, #405a7700);
    padding: 8px 14px;
    letter-spacing: 1px;
    cursor: default;
    transition: 0.3s;
}
#clockButton:hover {
    transform: scale(1.05);
}

.template {
    background: rgba(255, 255, 255, 0.75);
    padding: 10px;
    border: 1px solid #f2f2f2ce;
    border-radius: 5px;
    transition: 0.3s;
    position: relative;
    text-align: left;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
}

/* Şablon Vurgu Stili (scrollToTemplate ile aktifleşir) */
.template.highlight {
    box-shadow: 0 0 15px 5px rgba(0, 255, 255, 0.7);
}

.template input[type="text"] {
    font-family: 'Calibri', sans-serif;
    width: 100%;
    font-weight: bold;
    margin-bottom: 5px;
    border: none;
    font-size: 16px;
    padding: 5px;
    background: none;
    outline: none;
    box-sizing: border-box;
    color: black; 
}

.template input[type="text"].dark {
    color: rgb(0, 0, 0); 
}


.template .content {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border-radius: 5px;
    background: #f2f2f252;
    cursor: text;
    outline: none;
    overflow: auto;
    color: black;
    box-sizing: border-box;
    resize: vertical;
    word-wrap: break-word;
}

.template.dark .content {
    background: #3e3e3e;
    color: white;
}

.template.dark {
    background: #212529;
    border-color: #444;
}

.collapsed .content {
    display: none;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

/* Stickybar (UL) Stilleri */
.navbar { 
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: visible; 
    background-color: #191f28; 
    color: white; 
    position: sticky;
    border-radius: 10px;
    top: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
}

/* Navbar içindeki linkler için renk ayarlaması */
.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
}

/* Arama Kutusu Input Stili */
#searchBox {
    width: 300px;
    padding: 8px;
    margin: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: white;
}

/* Dark mode arama kutusu */
body.dark #searchBox {
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border-color: #555;
}

/* DROPDOWN STİLLERİ (Şablon Listesi) */
.dropdown-menu-container {
    position: relative;
    display: inline-block;
}

/* Liste İçeriği (Dropdown Kutusu) */
.dropdown-content {
    display: none; 
    position: absolute;
    top: 100%; 
    left: 0;
    min-width: 250px;
    background-color: #212121;
    border: 1px solid #444; 
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    padding: 8px;
    border-radius: 4px;
    max-height: 300px; 
    overflow-y: auto; 
    flex-direction: column; 
    gap: 3px;
    z-index: 1000; 
}

/* JavaScript ile .show sınıfı eklendiğinde liste görünür */
.dropdown-content.show {
    display: flex; 
}

/* Dropdown içindeki butonların stili */
.dropdown-content button {
    background-color: transparent; 
    color: #dcdcdc; 
    border: none;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
    margin: 0; 
}

.dropdown-content button:hover {
    background-color: #007bff;
    color: white;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease, top 0.5s ease;
    pointer-events: none;
    z-index: 10000;
}

.toast.show {
    opacity: 1;
    top: 20px;
}

/* Todo List */
#todoWrapper { all: initial; font-family: 'Calibri', sans-serif; position: relative; }
#todoWrapper #todoToggle { 
    position: fixed; bottom: 20px; right: 20px; z-index: 1000; background-color: #288fd1; color: white; border: none; padding: 10px 15px; border-radius: 50%; font-size: 18px; cursor: pointer; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); font-family: 'Calibri', sans-serif;
}
#todoWrapper #todoPopup { 
    display: none; position: fixed; bottom: 80px; right: 20px; width: 300px; max-height: 400px; background-color: white; border: 1px solid #ccc; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 15px; z-index: 999; overflow-y: auto; font-family: 'Calibri', sans-serif; color: #333;
}
body.dark #todoWrapper #todoPopup {
    background-color: #333;
    border-color: #555;
    color: #f2f2f2;
}
#todoWrapper #todoPopup h3 { 
    margin-top: 0; font-size: 18px; font-family: 'Calibri', sans-serif; color: inherit;
}
#todoWrapper input[type="text"] { 
    width: 100%; padding: 8px; margin-bottom: 10px; box-sizing: border-box; font-family: 'Calibri', sans-serif; border: 1px solid #ddd; color: #333; background-color: white;
}
body.dark #todoWrapper input[type="text"] {
    background-color: #212529;
    color: white;
    border-color: #555;
}
#todoWrapper ul { 
    list-style: none; padding: 0; margin: 0; display: block !important; background-color: transparent !important;
}
#todoWrapper li { 
    display: flex !important; flex-direction: row; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; padding: 6px; background-color: #f9f9f9; border-radius: 5px; gap: 8px; width: 100%; box-sizing: border-box;
}
body.dark #todoWrapper li {
    background-color: #444;
}
#todoWrapper li.completed .taskText { 
    text-decoration: line-through; color: gray;
}
#todoWrapper .taskText { 
    flex: 1; cursor: pointer; word-break: break-word; white-space: normal; overflow-wrap: break-word; line-height: 1.4; font-size: 13px !important; font-family: 'Calibri', sans-serif !important; color: #333;
}
body.dark #todoWrapper .taskText {
    color: #ccc;
}
#todoWrapper .deleteBtn { 
    background: none; border: none; color: rgb(31, 142, 233); font-weight: bold; cursor: pointer; font-size: 14px;
}

/* Dark Mode Slider */
.toggle-label { margin-left: auto; margin-right: 12px; position: relative; display: inline-block; width: 50px; height: 30px; }
.toggle-label input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #ccc; border-radius: 30px; transition: 0.4s; }
.slider::before { content: ""; position: absolute; height: 22px; width: 22px; left: 4px; bottom: 4px; background-color: white; transition: 0.4s; border-radius: 50%; }
input:checked+.slider { background-color: #a5a3a3; }
input:checked+.slider::before { transform: translateX(26px); }

/* Giriş Bölümü Kartları */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; padding: 2rem; border-top: dotted;}
.feature-card { border-radius: 12px; padding: 1rem; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); background-color: #405a775c; color: white; }
.feature-card h3 { margin-top: 0; color: #ffffff; }
.hero, .features { transition: all 0.3s ease; }
footer { margin-top: 30px; padding: 10px; font-size: 12px; color: #666; }
body.dark footer p, body.dark footer a { color: #aaa; }

/* Ana Kapsayıcı: Butonun referans noktasıdır ve yüksekliği sabitlemek en iyisidir. */
.search-input-container {
    position: relative;
    
    /* Input yüksekliğinize eşitleyin. Örneğin 40px kullanıyorsanız: */
    height: 40px; 
    
    display: inline-block; 
    /* width ve margin gibi değerleri projenize göre ayarlayın. */
}
.clear-button {
    position: absolute;
    
    /* Kapsayıcının tam dikey ortasına konumlandır */
    top: 50%; 
    transform: translateY(-50%); 
    
    right: 5px; /* Input'un sağ kenarından 5px içeride */
    
    /* Arka planı şeffaf yap, kenarlığı kaldır */
    background: #405a77;
    border: none;
    
    /* ... (Diğer stil özellikleriniz) */
}
/* ========================================= */
/* RESPONSIVE STİLLER (MOBİL CİHAZLAR İÇİN) */
/* ========================================= */
@media (max-width: 900px) {
    .templates-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .navbar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
        position: static; 
    }
    
    .navbar > li {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 5px 0;
    }
    
    #searchBox {
        width: 90%;
        max-width: 400px;
        margin: 5px auto;
        order: -1;
    }

    button {
        padding: 10px 10px;
        margin: 5px 5px;
        font-size: 14px;
        flex-grow: 1;
        min-width: 120px;
    }
    
    .dropdown-menu-container, 
    .toggle-label {
        margin: 5px 10px;
    }

    #clockButton {
        font-size: 14px;
        padding: 5px 8px;
        margin-left: 10px;
        margin-right: 10px;
        order: 1;
    }
    
    #todoWrapper #todoToggle {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 16px;
    }
    #todoWrapper #todoPopup {
        bottom: 60px; 
        right: 10px;
        width: calc(100% - 20px);
        max-width: 350px;
    }
    
    .features {
        padding: 1rem;
        gap: 1rem;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    }
    
    /* Şablonların içindeki buton konteynerini dikey yap */
    .template .buttons {
        flex-direction: column;
        gap: 5px;
    }

    /* Şablonların içindeki her butonu tam genişliğe yay */
    .template .buttons button {
        width: 100%;
        margin: 0;
        min-width: unset;
    }
}

