:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --accent: #00ff88;
    --accent-dim: #00cc6a;
    --text: #e0e0e0;
    --text-dim: #888;
    --border: #333;
    --divider: #2a2a2a;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--primary-bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TABS */
.nav-tabs {
    flex-shrink: 0;
    background: var(--secondary-bg);
    border-bottom: 2px solid var(--accent);
    padding: 0;
}

.nav-tabs .nav-link {
    color: var(--text-dim);
    border: none;
    font-family: 'Staatliches', cursive;
    font-size: 1.3rem;
    letter-spacing: 2px;
    padding: 15px 40px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tabs .nav-link:hover {
    color: var(--accent);
}

.nav-tabs .nav-link.active {
    color: var(--accent);
    background: var(--primary-bg);
}

.nav-tabs .nav-link.active::after {
    width: 100%;
}

.tab-content {
    flex: 1;
    overflow: hidden;
}

.tab-pane {
    height: 100%;
}

/* SPLIT CONTAINER */
.split-container {
    display: flex;
    height: 100%;
    background: var(--primary-bg);
}

.panel {
    background: var(--secondary-bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-panel {
    flex: 1;
    min-width: 300px;
}

.file-panel {
    flex: 1;
    min-width: 300px;
}

.divider {
    width: 8px;
    background: var(--divider);
    cursor: col-resize;
    position: relative;
    transition: background 0.2s;
}

.divider:hover,
.divider.dragging {
    background: var(--accent);
}

.divider::before {
    content: '⋮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-dim);
    font-size: 20px;
    letter-spacing: -4px;
}

.panel-header {
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    font-family: 'Staatliches', cursive;
    font-size: 1.4rem;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
}

/* CHAT PANEL */
.chat-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chat-messages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
}

.chat-divider {
    height: 8px;
    background: var(--divider);
    cursor: row-resize;
    position: relative;
    transition: background 0.2s;
    z-index: 10;
}

.chat-divider:hover,
.chat-divider.dragging {
    background: var(--accent);
}

.chat-divider::before {
    content: '⋯';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-dim);
    font-size: 20px;
    letter-spacing: 2px;
}

.chat-input-container {
    display: flex;
    flex-direction: column;
    min-height: 200px;
    overflow: hidden;
}

.chat-input-area {
    flex: 1;
    border-top: 1px solid var(--border);
    padding: 20px;
    background: var(--primary-bg);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-input-area textarea {
    flex: 1;
    width: 100%;
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    resize: none;
    transition: border-color 0.3s;
    min-height: 0;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

/* MESSAGES */
.message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.message-content {
    background: var(--primary-bg);
    padding: 12px 16px;
    border-left: 3px solid var(--accent);
    border-radius: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message.user .message-content {
    border-left-color: #0088ff;
    background: #0f151f;
}

.message.assistant .message-content {
    border-left-color: var(--accent-dim);
    background: #0f1f0f;
}

.message.status .message-content {
    border-left-color: #ffb800;
    background: #1f1a0f;
    font-style: italic;
}

.message.progress .message-content {
    border-left-color: #00ccff;
    background: #0f1a1f;
    font-style: italic;
}

.message.error .message-content {
    border-left-color: #ff4444;
    background: #1f0f0f;
}

/* BUTTONS */
.chat-button-area {
    padding-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.chat-input-area button {
    background: var(--accent);
    color: var(--primary-bg);
    border: none;
    padding: 12px 20px;
    font-family: 'Staatliches', cursive;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
}

.chat-input-area button:hover:not(:disabled) {
    background: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.chat-input-area button:active:not(:disabled) {
    transform: translateY(0);
}

.chat-input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input-area button.btn-secondary {
    background: #4444ff;
    color: white;
}

.chat-input-area button.btn-secondary:hover:not(:disabled) {
    background: #6666ff;
    box-shadow: 0 4px 12px rgba(68, 68, 255, 0.3);
}

.chat-input-area button.btn-warning {
    background: #ffb800;
    color: var(--primary-bg);
}

.chat-input-area button.btn-warning:hover:not(:disabled) {
    background: #ffa000;
    box-shadow: 0 4px 12px rgba(255, 184, 0, 0.3);
}

/* FILE PANEL */
.file-structure {
    overflow-y: auto;
    padding: 15px;
    min-height: 0;
    transition: flex 0.3s ease;
}

.file-content.visible {
    display: block;
}

.file-panel.content-visible .file-structure {
    flex: 1;
}

.file-panel.content-visible .file-content {
    flex: 1;
}

.file-panel:not(.content-visible) .file-structure {
    flex: 1;
}


.folder-clickable {
    cursor: pointer;
    transition: background-color 0.3s;
}

.folder-clickable:hover {
    background-color: var(--secondary-bg);
}

.folder.expanded > .file, 
.folder.expanded > .folder {
    display: block;
}

.folder > .file, 
.folder > .folder {
    display: none;
}

/* Mappák beljebb kezdése */
.folder {
    padding-left: 20px;
    cursor: pointer;
}

.subfolder-container {
    display: none;
    margin-left: 20px; /* Mappák és fájlok beljebb kezdése */
}

.file {
    padding-left: 40px; /* Fájlok egy szinttel beljebb kezdődnek */
    cursor: pointer;
}


.file-content {
    overflow-y: auto;
    padding: 20px;
    background: var(--primary-bg);
    display: none;
    min-height: 0;
    border-top: 1px solid var(--border);
    position: relative; /* Add relative positioning for child elements */
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.close-file-btn,
.copy-to-clipboard-btn
  {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text);
    transition: color 0.3s ease;
}

.close-file-btn:hover {
    color: #ff4444;
}

.copy-to-clipboard-btn {
    transition: all 0.3s ease; /* Az átmenet animációja */
    background-color: #4CAF50; /* Alap háttérszín */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Amikor másolás után kattintanak */
.copy-to-clipboard-btn.copied {
    background-color: #00cc44; /* Zöld szín a másolás sikerességére */
    color: white;
    animation: buttonChange 1s ease; /* Animáció a gombhoz */
}

/* Ikon változtatás (pl. másolás ikonjának változása) */
.copy-to-clipboard-btn.copied i {
    content: "\f0c5"; /* Itt változtathatod a másik ikonra (például egy pipa ikonra) */
}

/* Gomb animáció */
@keyframes buttonChange {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
