/**
 * Sistem Kurulum Rehberi - Ana Stil Dosyası
 * Dark tema, GitHub tarzı tasarım
 */

/* ========================================
   GENEL AYARLAR
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
}

/* ========================================
   ÜST BAR
   ======================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.top-bar h1 {
    font-size: 16px;
    color: #58a6ff;
    font-weight: 600;
}

.mode-switch {
    display: flex;
    gap: 10px;
}

.mode-btn {
    background: #1c2128;
    color: #8b949e;
    border: 1px solid #30363d;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-weight: 500;
}

.mode-btn:hover {
    background: #238636;
    color: white;
    border-color: #238636;
}

.mode-btn.active {
    background: #58a6ff;
    color: #0d1117;
    border-color: #58a6ff;
}

/* ========================================
   ANA WRAPPER
   ======================================== */
.main-wrapper {
    margin-top: 50px;
    width: 100%;
    height: calc(100vh - 50px);
    overflow: hidden;
}

.view {
    display: none;
    height: 100%;
}

.view.active {
    display: flex;
}

.container {
    display: flex;
    height: 100%;
}

/* ========================================
   SOL MENÜ (SIDEBAR)
   ======================================== */
.sidebar {
    width: 280px;
    background: #161b22;
    border-right: 1px solid #30363d;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #30363d;
}

.sidebar-header h2 {
    color: #58a6ff;
    font-size: 16px;
    font-weight: 600;
}

.system-item {
    margin: 5px 0;
}

.system-title {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.system-title:hover {
    background: #1c2128;
}

.system-title.active {
    background: #1c2128;
    border-left: 3px solid #58a6ff;
}

.system-name {
    font-weight: 500;
    color: #e6edf3;
    font-size: 14px;
}

.arrow {
    transition: transform 0.2s;
    color: #8b949e;
    font-size: 12px;
}

.arrow.rotated {
    transform: rotate(90deg);
}

/* ========================================
   DOSYA AĞACI
   ======================================== */
.file-tree {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #0d1117;
}

.file-tree.open {
    max-height: 1000px;
}

.folder {
    padding-left: 15px;
}

.folder-header {
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #8b949e;
    user-select: none;
}

.folder-header:hover {
    background: #1c2128;
    color: #c9d1d9;
}

.folder-icon {
    transition: transform 0.2s;
    font-size: 11px;
}

.folder-icon.open {
    transform: rotate(90deg);
}

.folder-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.folder-content.open {
    max-height: 800px;
}

.file-item {
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8b949e;
}

.file-item:hover {
    background: #1c2128;
    color: #c9d1d9;
}

.file-item.selected {
    background: #1c2128;
    color: #58a6ff;
    border-left: 2px solid #58a6ff;
}

/* ========================================
   ANA İÇERİK ALANI
   ======================================== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
}

.welcome-screen {
    text-align: center;
    padding: 100px 20px;
}

.welcome-screen h1 {
    color: #58a6ff;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
}

.welcome-screen p {
    color: #8b949e;
    font-size: 15px;
}

.content-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #30363d;
}

.content-header h1 {
    color: #e6edf3;
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.content-header .subtitle {
    color: #8b949e;
    font-size: 13px;
}

/* ========================================
   ADIM KARTLARI
   ======================================== */
.step {
    margin-bottom: 25px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
}

.step-header {
    background: #1c2128;
    padding: 12px 18px;
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-number {
    background: #58a6ff;
    color: #0d1117;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.step-title {
    font-weight: 600;
    color: #e6edf3;
    font-size: 14px;
}

.step-content {
    padding: 18px;
}

.instruction {
    color: #8b949e;
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 13px;
}

/* ========================================
   KOD BLOKLARI
   ======================================== */
.code-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 14px;
    position: relative;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #30363d;
}

.code-label {
    color: #58a6ff;
    font-size: 11px;
    font-weight: 600;
}

.copy-btn {
    background: #238636;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.2s;
    font-weight: 500;
}

.copy-btn:hover {
    background: #2ea043;
}

.copy-btn.copied {
    background: #1f6feb;
}

pre {
    margin: 0;
    overflow-x: auto;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e6edf3;
}

/* ========================================
   ADMIN PANELİ
   ======================================== */
.admin-panel {
    width: 100%;
    padding: 30px;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h2 {
    color: #e6edf3;
    font-size: 24px;
    font-weight: 600;
}

/* ========================================
   BUTONLAR
   ======================================== */
.btn {
    background: #238636;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    font-weight: 500;
}

.btn:hover {
    background: #2ea043;
}

.btn-danger {
    background: #da3633;
}

.btn-danger:hover {
    background: #f85149;
}

.btn-secondary {
    background: #1c2128;
    border: 1px solid #30363d;
    color: #c9d1d9;
}

.btn-secondary:hover {
    background: #30363d;
}

.btn-small {
    background: #1c2128;
    color: #8b949e;
    border: 1px solid #30363d;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #30363d;
    color: #c9d1d9;
}

/* ========================================
   SİSTEM LİSTESİ (ADMIN)
   ======================================== */
.systems-list {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
}

.system-card {
    padding: 20px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-card:last-child {
    border-bottom: none;
}

.system-info h3 {
    color: #e6edf3;
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.system-info p {
    color: #8b949e;
    font-size: 13px;
}

.system-actions {
    display: flex;
    gap: 10px;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #e6edf3;
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #c9d1d9;
}

.modal-body {
    padding: 20px;
}

/* ========================================
   FORM ELEMANLARI
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e6edf3;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #58a6ff;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* ========================================
   AĞAÇ OLUŞTURUCU
   ======================================== */
.tree-builder {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tree-header h4 {
    color: #e6edf3;
    font-size: 14px;
    font-weight: 600;
}

.tree-item {
    margin: 5px 0;
    padding: 8px 10px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tree-item-name {
    color: #c9d1d9;
    font-size: 13px;
}

.tree-item-actions {
    display: flex;
    gap: 5px;
}

/* ========================================
   ADIM OLUŞTURUCU
   ======================================== */
.step-builder {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.step-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

.step-builder-header h5 {
    color: #58a6ff;
    font-size: 14px;
    font-weight: 600;
}

/* ========================================
   YARDIMCI SINIFLAR
   ======================================== */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #8b949e;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* ========================================
   RESPONSIVE TASARIM
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #30363d;
    }
    
    .container {
        flex-direction: column;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .modal-content {
        max-width: 100%;
    }
}
