﻿:root {
    --bg-color: #ffffff;
    --sidebar-bg: #f0f4f9;
    --primary-color: #0b57d0;
    --text-primary: #1f1f1f;
    --text-secondary: #444746;
    --user-msg-bg: #f0f4f9;
    --ai-msg-bg: #ffffff;
    --border-color: #e1e3e1;
    --success-color: #188038;
    --locked-color: #8e918f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* GİRİŞ */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#login-card {
    width: 100%;
    max-width: 380px;
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

#login-form h2 {
    margin: 10px 0 5px;
    color: #333;
}

#login-form p {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    text-align: left;
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: 500;
        color: #555;
    }

    .form-group input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 16px;
        outline: none;
        transition: border 0.3s;
    }

        .form-group input:focus {
            border-color: var(--primary-color);
        }

#login-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* DÜZEN */
#app-layout {
    display: none;
    height: 100vh;
    width: 100vw;
}

/* SIDEBAR */
#sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 20px;
}

    .sidebar-header h3 {
        margin: 0;
        color: #444;
        font-size: 1.3rem;
    }

    .sidebar-header span {
        color: var(--primary-color);
    }

.sidebar-menu {
    flex-grow: 1;
    margin-top: 10px;
}

.menu-title {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
    padding-left: 5px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 16px;
    cursor: default;
    transition: 0.3s;
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.step-content {
    flex-grow: 1;
}

.step-title {
    font-weight: 500;
    font-size: 14px;
}

.step-desc {
    font-size: 11px;
    color: #666;
}

.step-item.active {
    background: #d3e3fd;
    color: #041e49;
    border-color: #a8c7fa;
}

    .step-item.active .step-icon, .step-item.active .step-status {
        color: var(--primary-color);
    }

.step-item.completed {
    background: #e6f4ea;
    color: var(--success-color);
}

    .step-item.completed .step-icon, .step-item.completed .step-status {
        color: var(--success-color);
    }

.step-item.locked {
    color: var(--locked-color);
    opacity: 0.6;
}

.sidebar-action {
    margin-top: 10px;
    margin-bottom: 20px;
}

.finish-btn {
    width: 100%;
    padding: 12px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

    .finish-btn:hover {
        background: #146c2e;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .finish-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        box-shadow: none;
    }

.sidebar-footer {
    padding-top: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    background: #c2e7ff;
    color: #001d35;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.id-text {
    font-size: 11px;
    color: #666;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #444;
    padding: 5px;
}

/* CHAT ALANI */
#main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #fff;
}

#chat-window {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.welcome-screen {
    text-align: center;
    margin-top: 10vh;
    color: #444;
    padding: 0 20px;
}

.logo-large span {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.welcome-screen h1 {
    margin: 10px 0;
    font-size: 2rem;
    color: var(--text-primary);
}

.message-row {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    gap: 15px;
}

    .message-row.user {
        justify-content: flex-end;
    }

    .message-row.ai {
        justify-content: flex-start;
    }

.bubble {
    max-width: 90%;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.6;
    font-size: 15px;
    white-space: pre-wrap; /* ÖNEMLİ: Kod ve metin satırlarını korur */
}

.message-row.user .bubble {
    background: var(--user-msg-bg);
    color: #1f1f1f;
    border-bottom-right-radius: 4px;
}

.message-row.ai .bubble {
    background: transparent;
    color: #1f1f1f;
    padding-left: 0;
}

/* KOD BLOKLARI */
pre {
    background: #1e1e1e;
    color: #dcdcdc;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
    margin: 0 0 10px 0;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    white-space: pre-wrap; /* Kodları pencereye sığdır */
    word-wrap: break-word;
}

.code-block {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.code-header {
    background: #333;
    color: #aaa;
    padding: 6px 15px;
    font-size: 12px;
    border-bottom: 1px solid #555;
    display: block;
    font-weight: bold;
    text-transform: uppercase;
}

/* INPUT ALANI */
#input-area {
    padding: 20px;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#input-form {
    width: 100%;
    max-width: 800px;
}

.input-wrapper {
    background: #f0f4f9;
    border-radius: 30px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    transition: 0.2s;
}

    .input-wrapper:focus-within {
        background: #e9eef6;
        box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    }

#message-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 16px;
    outline: none;
}

#send-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
}

    #send-btn:not(:disabled) {
        color: var(--primary-color);
    }

.disclaimer {
    font-size: 11px;
    color: #888;
    margin-top: 8px;
    text-align: center;
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.modal-card {
    background: white;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.scale-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 25px 0;
}

    .scale-buttons button {
        padding: 15px;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        font-size: 13px;
        font-weight: 600;
        color: #fff;
        text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    }

        .scale-buttons button:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        /* BUTON RENKLERİ */
        .scale-buttons button:nth-child(1) {
            background-color: #2e7d32;
        }

        .scale-buttons button:nth-child(2) {
            background-color: #43a047;
        }

        .scale-buttons button:nth-child(3) {
            background-color: #66bb6a;
        }

        .scale-buttons button:nth-child(4) {
            background-color: #f9a825;
        }

        .scale-buttons button:nth-child(5) {
            background-color: #ff8f00;
        }

        .scale-buttons button:nth-child(6) {
            background-color: #ef6c00;
        }

        .scale-buttons button:nth-child(7) {
            background-color: #d84315;
        }

        .scale-buttons button:nth-child(8) {
            background-color: #c62828;
        }

        .scale-buttons button:nth-child(9) {
            background-color: #b71c1c;
        }

#cancel-modal-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 10px;
}

/* YÜKLENİYOR ANİMASYONU */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
}

    .typing-indicator span {
        display: block;
        width: 8px;
        height: 8px;
        background-color: #bbb;
        border-radius: 50%;
        animation: typing 1.4s infinite ease-in-out both;
    }

        .typing-indicator span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #ccc;
    }
