:root {
    --color-primary: #4a6cf7;
    --color-primary-light: #6d89f8;
    --color-primary-dark: #3a5ae8;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-inverse: #fff;
    --color-background: #fff;
    --color-background-alt: #f8f9fa;
    --color-background-code: #f5f7ff;
    --color-border: #e9ecef;
    --color-sidebar: #f8f9fa;
    --color-header: #fff;
    --color-footer: #f8f9fa;
    --color-link: #4a6cf7;
    --color-link-hover: #3a5ae8;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
    --color-primary: #4a6cf7;
    --color-primary-light: #6d89f8;
    --color-primary-dark: #3a5ae8;
    --color-text: #e1e1e1;
    --color-text-light: #b0b0b0;
    --color-text-inverse: #222;
    --color-background: #222;
    --color-background-alt: #2a2a2a;
    --color-background-code: #333;
    --color-border: #444;
    --color-sidebar: #2a2a2a;
    --color-header: #222;
    --color-footer: #2a2a2a;
    --color-link: #6d89f8;
    --color-link-hover: #8aa2f9;
    --box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    transition: var(--transition);
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-link-hover);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px; /* Kenar boşluğunu artırdım (20px'ten 30px'e) */
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0 15px; /* Tüm uygulamaya kenar boşluğu ekledim */
}

.app-main {
    flex: 1;
    padding: 20px 0;
    margin: 0 auto; /* Yatayda otomatik ortalama */
    width: 100%;
    max-width: 1230px; /* İçerik için maksimum genişlik */
}

/* Header */
.app-header {
    background-color: var(--color-header);
    box-shadow: var(--box-shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Ekledim - wrap özelliği sayesinde responsive davranış için */
    gap: 10px; /* Ekledim - öğeler arasında boşluk */
}

.brand a {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.brand i {
    margin-right: 10px;
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    margin-left: auto; /* Ekledim - sağa yaslanması için */
}

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--color-text);
    cursor: pointer;
    margin-left: 15px;
    padding: 5px;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--color-primary);
}

/* Search Box */
.search-box {
    position: relative;
    margin-right: 15px;
}

.search-box input {
    width: 250px;
    padding: 8px 35px 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--color-background);
    color: var(--color-text);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    padding: 0 10px;
    cursor: pointer;
    color: var(--color-text-light);
}

.search-box button:hover {
    color: var(--color-primary);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: var(--box-shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.active {
    display: block;
}

.search-results a {
    display: block;
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.search-results a:hover {
    background-color: var(--color-background-alt);
}

.search-results .no-results {
    padding: 8px 12px;
    color: var(--color-text-light);
    font-style: italic;
}

/* Footer */
.app-footer {
    background-color: var(--color-footer);
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    transition: var(--transition);
}

/* Docs Layout */
.docs-container {
    display: flex;
    gap: 30px;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--color-sidebar);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-header h3 {
    font-size: 18px;
    color: var(--color-text);
}

.docs-nav .category {
    margin-bottom: 20px;
}

.docs-nav .category h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--color-text);
}

.docs-nav ul {
    list-style: none;
}

.docs-nav ul li {
    margin-bottom: 5px;
}

.docs-nav ul li a {
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--color-text-light);
    font-size: 14px;
    transition: var(--transition);
}

.docs-nav ul li a:hover {
    background-color: rgba(74, 108, 247, 0.1);
    color: var(--color-primary);
}

.docs-nav ul li a.active {
    background-color: var(--color-primary);
    color: white;
}

/* Dokuman içeriği için ilave padding */
.doc-content {
    flex: 1;
    min-width: 0;
    padding: 0 10px; /* İçeriğe ilave iç boşluk */
}

/* Document View */
.document-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.document-header h1 {
    font-size: 2rem;
    color: var(--color-text);
    margin: 0;
}

.document-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.version-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-selector select {
    padding: 5px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-background);
    color: var(--color-text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Markdown Content */
.markdown-body {
    color: var(--color-text);
    line-height: 1.6;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: var(--color-text);
}

.markdown-body h1 {
    font-size: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.3em;
}

.markdown-body h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.3em;
}

.markdown-body h3 {
    font-size: 1.25rem;
}

.markdown-body h4 {
    font-size: 1rem;
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body code {
    background-color: var(--color-background-code);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 85%;
}

.markdown-body pre {
    background-color: var(--color-background-code);
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    margin-bottom: 1rem;
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    font-size: 85%;
    color: inherit;
}

.markdown-body blockquote {
    padding: 0 1em;
    color: var(--color-text-light);
    border-left: 0.25em solid var(--color-border);
    margin-bottom: 1rem;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.markdown-body table th,
.markdown-body table td {
    padding: 8px;
    border: 1px solid var(--color-border);
}

.markdown-body table th {
    background-color: var(--color-background-alt);
    font-weight: 600;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.show {
    display: block;
}

.modal-dialog {
    max-width: 500px;
    margin: 60px auto;
}

.modal-content {
    background-color: var(--color-background);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--color-text-light);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--color-text);
}

.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

/* Documents Grid */
.documents-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--color-border);
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.doc-card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.doc-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.doc-card-content {
    margin-bottom: 15px;
}

.doc-card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.doc-card-content p {
    color: var(--color-text-light);
    font-size: 14px;
    margin: 0;
}

.doc-card-footer {
    display: flex;
    justify-content: flex-end;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2.25rem;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* Hamburger Menu */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: fixed;
    top: 20px;
    right: 20px;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 990;
}

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

/* Dokuman navigasyon düğmeleri için css */
.document-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.doc-nav-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
    max-width: 45%;
}

.doc-nav-btn:hover {
    background-color: var(--color-background);
    box-shadow: var(--box-shadow);
    color: var(--color-primary);
}

.doc-nav-btn.prev {
    justify-content: flex-start;
}

.doc-nav-btn.next {
    justify-content: flex-end;
}

.doc-nav-btn i {
    font-size: 16px;
}

.doc-nav-btn.prev i {
    margin-right: 10px;
}

.doc-nav-btn.next i {
    margin-left: 10px;
}

.doc-nav-btn .nav-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 576px) {
    .document-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .doc-nav-btn {
        max-width: 100%;
    }
}

/* Mobile Search Toggle */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--color-text);
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
}

/* Responsive Header Media Queries */
@media (max-width: 768px) {
    .header-content {
        padding: 10px 0;
    }
    
    .brand a span {
        font-size: 16px; /* Logo yazısını küçült */
    }
    
    .search-box input {
        width: 180px;
    }
}

@media (max-width: 576px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .brand {
        margin-bottom: 10px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }
    
    .search-box {
        flex: 1;
        margin-right: 10px;
    }
    
    .search-box input {
        width: 100%; /* Tam genişlik */
    }
    
    .mobile-search-toggle {
        display: inline-flex;
    }
}

/* Mobil responsive düzeltmeler */
@media (max-width: 768px) {
    .container {
        padding: 0 20px; /* Tablet görünümünde kenar boşlukları */
    }
    
    .app-container {
        margin: 0 10px; /* Tablet görünümünde app container kenar boşlukları */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px; /* Mobil görünümünde kenar boşlukları */
    }
    
    .app-container {
        margin: 0 5px; /* Mobil görünümünde app container kenar boşlukları */
    }
}

/* Prism.js Copy Button Styles */
.code-toolbar {
    position: relative;
}

.code-toolbar .toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.code-toolbar:hover .toolbar {
    opacity: 1;
}

.code-toolbar .toolbar .toolbar-item {
    display: inline-flex;
}

.code-toolbar .toolbar button.copy-to-clipboard-button {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
}

.code-toolbar .toolbar button.copy-to-clipboard-button:hover {
    background: var(--color-primary-dark);
}

.code-toolbar .toolbar button.copy-to-clipboard-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.5);
}

.code-toolbar .toolbar .copy-to-clipboard-button::before {
    content: "\f0c5"; /* Font Awesome kopya simgesi */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.code-toolbar .toolbar button.copy-to-clipboard-button[data-copy-state="copy"] {
    background: var(--color-primary);
}

.code-toolbar .toolbar button.copy-to-clipboard-button[data-copy-state="copied"] {
    background: #4caf50; /* Yeşil renk - başarıyla kopyalandı */
}

/* Markdown içindeki kod blokları için ilave stil */
.markdown-body pre {
    position: relative;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dil gösterge etiketi */
.markdown-body pre::before {
    content: attr(data-lang);
    position: absolute;
    top: 0;
    left: 10px;
    font-size: 12px;
    color: var(--color-text-light);
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0 0 4px 4px;
    text-transform: uppercase;
}
/* Kod bloğu wrapper stilleri */
.code-block-wrapper {
    position: relative;
    margin: 1.5em 0;
}

/* Dil etiketi stilleri */
.code-language {
    position: absolute;
    top: 0;
    left: 10px;
    background-color: var(--color-primary);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 0 0 4px 4px;
    text-transform: uppercase;
    z-index: 10;
}

/* Kopyalama butonu stilleri */
.copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
}

.code-block-wrapper:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: var(--color-primary-dark);
}

.copy-btn:focus {
    outline: none;
}

/* Kod bloğu stilleri */
pre {
    margin: 0;
    overflow: auto;
    border-radius: 6px;
    padding-top: 24px !important; /* Dil etiketi için ekstra padding */
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Dark temada görünüm */
[data-theme="dark"] .code-language {
    background-color: var(--color-primary-dark);
}

/* Mobil görünüm için düzenlemeler */
@media (max-width: 576px) {
    .code-language {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .copy-btn {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* Mobil cihazlar için sidebar stillemesi */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        margin: 0;
        padding-top: 60px;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .docs-container {
        display: block;
    }
    
    .doc-content {
        width: 100%;
    }
}
/* Versiyon seçici için mobil düzenlemeler */
@media (max-width: 768px) {
    .version-selector {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .version-selector select {
        width: 100%;
        padding: 10px;
        font-size: 16px; /* Mobilde daha büyük font */
        height: 40px; /* Seçicinin yüksekliğini arttır */
        -webkit-appearance: none; /* Daha iyi görünüm için */
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
        background-size: 16px;
    }
    
    /* Dropdown pozisyon düzeltmesi için */
    .document-actions {
        position: relative;
        width: 100%;
    }
    
    /* Daha belirgin görünüm için kenarlıkları güçlendir */
    .version-selector select:focus {
        border-color: var(--color-primary);
        outline: none;
        box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
    }
}

/* Genel olarak doküman header düzenlemesi */
@media (max-width: 768px) {
    .document-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .document-actions {
        width: 100%;
    }
}
/* Custom Versiyon Seçici */
.custom-version-selector {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
    font-size: 14px;
}

.selector-header {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-background);
    cursor: pointer;
    user-select: none;
}

.selector-header:hover {
    border-color: var(--color-primary-light);
}

.selected-version {
    font-weight: 500;
    flex-grow: 1;
}

.custom-version-selector .dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: var(--box-shadow);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.custom-version-selector .dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.custom-version-selector .dropdown-item:hover {
    background-color: var(--color-background-alt);
}

.custom-version-selector .dropdown-item.active {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.custom-version-selector .dropdown-menu.show {
    display: block;
}

@media (max-width: 768px) {
    .selector-header {
        padding: 12px;
        font-size: 16px;
    }

    .custom-version-selector .dropdown-item {
        padding: 12px;
        font-size: 16px;
    }
}
