/* Ana stil dosyası */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #27ae60;
    --light-bg: #f5f7fa;
    --dark-bg: #34495e;
    --text-color: #333;
    --text-light: #7f8c8d;
    --border-color: #ddd;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --body-bg: #f5f7fa;
    --card-bg: #fff;
    --header-bg: #fff;
    --footer-bg: #fff;
}

/* Dark Mode özelliği */
body.dark-mode {
    --primary-color: #3a536b;
    --secondary-color: #2980b9;
    --accent-color: #2ecc71;
    --light-bg: #2c3e50;
    --dark-bg: #1a2533;
    --text-color: #ecf0f1;
    --text-light: #bdc3c7;
    --border-color: #4a6582;
    --body-bg: #1a2533;
    --card-bg: #2c3e50;
    --header-bg: #2c3e50;
    --footer-bg: #2c3e50;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    display: flex;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-bg);
    color: #fff;
    transition: all 0.3s;
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    height: 100%;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar .logo {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

.sidebar .logo img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    transition: all 0.3s;
}

.sidebar .logo span {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.3s;
}

.sidebar.collapsed .logo span {
    display: none;
}

/* Main Menu Styles */
.main-menu {
    padding: 10px 0;
}

.main-menu ul {
    list-style: none;
}

.main-menu li {
    position: relative;
}

.main-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.main-menu li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    transition: all 0.3s;
}

.main-menu li a .fa-chevron-down {
    margin-left: auto;
    margin-right: 0;
    font-size: 12px;
    transition: all 0.3s;
}

.main-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-menu li a.active {
    background-color: var(--secondary-color);
    font-weight: bold;
}

.main-menu .sub-menu {
    display: none;
    background-color: rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease-in-out;
}

.main-menu .menu-item-has-children.active .sub-menu {
    display: block;
    max-height: 2000px; /* Bir değer vermek gerekiyor, çok uzun menüleriniz varsa bu değeri arttırabilirsiniz */
}

.main-menu .sub-menu a {
    padding-left: 45px;
    font-size: 14px;
}

.sidebar.collapsed .main-menu li a span {
    display: none;
}

.sidebar.collapsed .main-menu li a .fa-chevron-down {
    display: none;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
}

.sidebar.collapsed + .content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
header {
    background-color: var(--header-bg);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 990;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

#toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: color 0.3s ease;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 5px;
    transition: color 0.3s ease;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background-color: var(--light-bg);
    border-radius: 20px;
    padding: 5px 10px;
    margin-right: 15px;
    height: 36px;
    transition: background-color 0.3s ease;
}

.search-box input {
    border: none;
    background-color: transparent;
    padding: 5px 10px;
    width: 180px;
    outline: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.search-box button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    padding: 5px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.user-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Main Content */
main {
    padding: 20px;
    min-height: calc(100vh - var(--header-height) - 60px); /* Header height + footer height */
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .search-box input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        top: 0;
        height: 100%;
        z-index: 1001;
        transition: all 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .breadcrumb {
        display: none;
    }
    
    #toggle-sidebar {
        margin-right: 0;
    }
    
    .user-btn span {
        display: none;
    }
    
    .header-right {
        margin-left: auto;
    }
    
    .search-box {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        z-index: 1000;
        border-radius: 0;
        margin: 0;
        display: none;
        padding: 10px 20px;
        background-color: var(--header-bg);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .search-box.active {
        display: flex;
    }
    
    .search-box input {
        flex: 1;
        width: auto;
    }
    
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
        z-index: 999;
        transition: background-color 0.3s ease;
    }
    
    .mobile-nav a {
        flex: 1;
        text-align: center;
        padding: 12px;
        color: var(--text-light);
        text-decoration: none;
        font-size: 22px;
        transition: color 0.3s ease;
    }
    
    .mobile-nav a.active {
        color: var(--secondary-color);
    }
    
    main {
        padding-bottom: 70px; /* Mobile navigation height */
    }
    
    .mobile-search-toggle {
        display: block;
    }
}

/* Utility Classes */
.hide-desktop {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .hide-desktop {
        display: block;
    }
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    margin-right: 15px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--text-color);
    background: transparent;
    border: none;
}

.dark-mode-toggle:hover {
    background-color: var(--light-bg);
}

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
}

/* Mobile Search Toggle */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    margin-right: 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-search-toggle {
        display: block;
    }
}

/* Animasyon eklemeleri */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fadeIn {
    animation: fadeIn 0.3s ease-in-out;
}

/* Mobil menü overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.sidebar-overlay.active {
    display: block;
}

/* Table styles for better mobile view */
.table-responsive {
    overflow-x: auto;
}

/* Dark mode için tablo stilleri */
.table-responsive table {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.template-tags-table th,
.template-tags-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid var(--border-color);
    vertical-align: top;
    word-wrap: break-word;
    transition: border-color 0.3s ease;
}

.template-tags-table th {
    background-color: var(--light-bg);
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.template-tags-table tr:hover {
    background-color: rgba(127, 140, 141, 0.1);
}

.template-tags-table td code {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 3px 6px;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    color: var(--accent-color);
    word-break: break-word;
    max-width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode .template-tags-table td code {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .template-tags-table td,
    .template-tags-table th {
        padding: 8px;
        font-size: 14px;
    }
}

/* Mobil navbar aktif durum göstergesi */
.mobile-nav a {
    position: relative;
}

.mobile-nav a.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    width: 40%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px;
}

/* Mobil klavuz stili iyileştirmeleri */
@media (max-width: 768px) {
    h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: 20px;
        margin: 20px 0 10px;
    }
    
    .intro-box {
        padding: 10px;
    }
}

/* Mobil ikon ve menü düzeltmeleri */
@media (max-width: 768px) {
    .sidebar .logo {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar .logo img {
        margin-right: 10px;
    }
}

/* Karanlık mod için ek stiller */
.dark-mode .search-box {
    box-shadow: 0 0 0 1px var(--border-color);
}

.dark-mode .intro-box,
.dark-mode .example-box {
    background-color: rgba(41, 128, 185, 0.1);
}

.dark-mode pre,
.dark-mode code {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: var(--border-color);
}

.dark-mode .template-tags-table td[colspan="2"] {
    background-color: rgba(0, 0, 0, 0.2);
}

.dark-mode .search-results-container .search-result-item {
    border-bottom-color: var(--border-color);
}

.dark-mode .search-info, 
.dark-mode .search-tips,
.dark-mode .no-results {
    background-color: var(--dark-bg);
}

.dark-mode mark {
    background-color: rgba(241, 196, 15, 0.3);
    color: #f1c40f;
}

/* Tooltip Stilleri */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.tooltiptext {
    visibility: hidden;
    width: auto;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 12px;
    font-weight: normal;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Menü öğelerinin tooltip pozisyonu için ince ayar */
.main-menu a {
    position: relative;
}

/* Dark mode uyumluluğu */
@media (prefers-color-scheme: dark) {
    .tooltiptext {
        background-color: #555;
        color: #eee;
    }
    
    .tooltiptext::after {
        border-color: #555 transparent transparent transparent;
    }
}