/* GREDO AI - Fő stílusok */
/* Reset és alapok */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Színek - Dark mode */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-panel: #242424;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #4a9eff;
    --accent-hover: #3a8eef;
    --success: #4caf50;
    --danger: #ff4444;
    --warning: #ff9800;
    --border: #333333;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body.light {
    /* Színek - Light mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-panel: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Glassmorphism effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Login oldal */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.login-container {
    width: 90%;
    max-width: 420px;
    padding: 48px;
    animation: slideUp 0.5s ease;
}

.logo-text {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Form elemek */
.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.login-button {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.3);
}

/* Main page layout */
.main-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.main-header h1 {
    font-size: 20px;
    font-weight: 700;
}

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

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Code panel (2/3) */
.code-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.code-container {
    flex: 1;
    position: relative;
}

#codeServerFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Chat panel (1/3) */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 16px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    animation: messageSlide 0.3s ease;
}

.message .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.message .content {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-panel);
    border-radius: 12px;
    line-height: 1.6;
}

.chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.input-wrapper {
    display: flex;
    gap: 8px;
}

#chatInput {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
}

/* Bottom panels */
.bottom-panels {
    display: flex;
    height: 200px;
    border-top: 1px solid var(--border);
}

.monitor-panel,
.approval-panel {
    flex: 1;
    padding: 16px 24px;
    overflow-y: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

.progress-fill.cpu { background: #4a9eff; }
.progress-fill.ram { background: #4caf50; }
.progress-fill.gpu { background: #ff9800; }
.progress-fill.vram { background: #9c27b0; }

/* Buttons */
button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
}

.approve-btn {
    background: var(--success);
    color: white;
}

.reject-btn {
    background: var(--danger);
    color: white;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse animation */
.pulse-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
/* LAYOUT JAVÍTÁSOK */
/* Kisebb alsó panelek */
.bottom-panels {
    height: 150px !important;  /* 200px helyett */
}

/* Chat és Code ugyanakkora magasság */
.main-content {
    height: calc(100vh - 60px - 150px);  /* header - footer */
}

.chat-panel {
    height: 100%;
    margin: 0;
    border-radius: 0;
}

.code-panel,
.chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Chat input fix - dark mode */
#chatInput {
    color: var(--text-primary) !important;  /* Fehér betű dark mode-ban */
}

/* Hangszóró gomb hozzáadása */
.voice-controls {
    display: flex;
    gap: 8px;
}

.speaker-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
}

/* Beállítások menü */
.settings-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: none;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.settings-menu.show {
    display: block;
}

.settings-menu button {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    margin-bottom: 8px;
}

/* Hangszóró gomb pozíció javítás */
.speaker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat input szöveg szín javítás - FONTOS! */
#chatInput {
    color: #ffffff !important;  /* Fehér szöveg dark mode-ban */
    background: var(--bg-secondary);
}

body.light #chatInput {
    color: #000000 !important;  /* Fekete szöveg light mode-ban */
}

/* Input focus állapot */
#chatInput:focus {
    color: #ffffff !important;
}
