/* ==========================================================================
   KineraAI - Custom Obfuscated Style Engine (71vmap0.css)
   Core Premium UI Framework & Glowing Aura Interface
   Developed by: TheRkpyYT
   ========================================================================== */

:root {
    --bg-main: #060913;
    --bg-sidebar: #0b0f19;
    --bg-card: #0e1424;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.35);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.06);
    --error: #ef4444;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: table;
}

/* Base Layout Container Wrapper using display table layout rules */
.app-container {
    display: table-row;
    width: 100%;
    height: 100%;
}

.sidebar-cell {
    display: table-cell;
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    vertical-align: top;
    height: 100vh;
}

.main-cell {
    display: table-cell;
    vertical-align: top;
    height: 100vh;
    background-color: var(--bg-main);
    position: relative;
}

/* Sidebar Styling */
.sidebar-content {
    display: block;
    padding: 20px;
    height: 100%;
    position: relative;
}

.logo-section {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.logo-section span {
    color: var(--accent);
}

.nav-menu {
    display: block;
    margin-bottom: 40px;
}

.nav-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

.nav-item.active {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.user-profile-section {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--bg-card);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.user-avatar-circle {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: var(--accent);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    font-weight: bold;
    margin-right: 10px;
    vertical-align: middle;
}

.user-info-text {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 55px);
}

.username-display {
    font-size: 13.5px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.logout-action-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    padding: 6px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.logout-action-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Main Screen Core Structure */
.top-header-bar {
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    background-color: var(--bg-sidebar);
    position: relative;
}

.hamburger-trigger-btn {
    display: none;
    font-size: 20px;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.header-status-badges {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.status-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 8px;
    color: var(--text-muted);
}

/* Content Panel Views */
.content-section {
    display: none;
    padding: 24px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.content-section.active {
    display: block;
}

/* Chat Module Frame Layout */
.chat-window-layout {
    position: relative;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.chat-scroll-container {
    height: calc(100% - 90px);
    overflow-y: auto;
    padding-bottom: 20px;
}

.welcome-screen-box {
    text-align: center;
    padding-top: 10vh;
}

.welcome-logo {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 10px;
}

.welcome-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 30px;
}

/* Chat Message Bubbles */
.message {
    margin-bottom: 20px;
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message.user {
    background-color: var(--accent);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.ai {
    background-color: var(--bg-card);
    color: var(--text-main);
    margin-right: auto;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Input Area Console */
.input-console-wrapper {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 14px;
}

.chat-input-textarea {
    width: calc(100% - 45px);
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 15px;
    resize: none;
    outline: none;
    max-height: 200px;
    min-height: 24px;
    vertical-align: middle;
}

.send-message-btn {
    display: none;
    width: 36px;
    height: 36px;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    line-height: 36px;
    font-size: 14px;
    float: right;
    transition: background 0.2s;
}

.send-message-btn:hover {
    background-color: #2563eb;
}

/* ==========================================================================
   GLOW THINKING BOX SYSTEM (PREMIUM FUTURISTIC INTERFACE)
   ========================================================================== */
.glow-thinking-box {
    background-color: #0b111e;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
}

/* 1. Processing Blue Pulsing Aura Effect */
.glow-thinking-box.processing {
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
    animation: blueGlowPulse 2s infinite ease-in-out;
}

@keyframes blueGlowPulse {
    0% { border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 0 10px rgba(59, 130, 246, 0.1); }
    50% { border-color: rgba(59, 130, 246, 0.7); box-shadow: 0 0 20px rgba(59, 130, 246, 0.35); }
    100% { border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 0 10px rgba(59, 130, 246, 0.1); }
}

/* 2. Complete Solid Mint Glow Aura Effect */
.glow-thinking-box.complete {
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.glow-thinking-box.complete:hover {
    border-color: var(--success);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

/* Thinking Box Layout Details */
.thinking-header {
    padding: 12px 16px;
    display: block;
    position: relative;
    user-select: none;
    font-size: 13.5px;
    font-weight: 600;
}

.glow-thinking-box.complete .thinking-header {
    cursor: pointer;
}

.thinking-status-text {
    letter-spacing: 0.3px;
}

.glow-thinking-box.processing .thinking-status-text {
    color: #93c5fd;
}

.glow-thinking-box.complete .thinking-status-text {
    color: #6ee7b7;
}

.arrow-icon {
    font-size: 11px;
    color: var(--text-muted);
    position: absolute;
    right: 16px;
    top: 50%;
    margin-top: -6px;
    transition: transform 0.2s ease;
}

.thinking-body-content {
    padding: 0 16px 16px 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #a3b3c9;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 12px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.thinking-loading-placeholder {
    color: var(--text-muted);
    font-size: 12.5px;
}

.reply-content {
    font-size: 15px;
    line-height: 1.6;
    color: #e3e3e3;
    margin-top: 4px;
}

/* Settings Form Elements Control */
.settings-group {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.settings-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control-input {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    margin-bottom: 12px;
}

.form-control-input:focus {
    border-color: var(--accent);
}

.action-submit-btn {
    background-color: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.action-submit-btn:hover {
    background-color: #2563eb;
}

/* Code block view styling */
pre {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13.5px;
    color: #f69d50;
}

/* Modals Overlay Base */
.modal-overlay {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background-color: rgba(4, 6, 12, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    padding: 26px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header-tabs {
    display: block;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.modal-tab {
    display: inline-block;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.error-text-log {
    color: var(--error);
    font-size: 12.5px;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .sidebar-cell {
        position: fixed;
        left: -260px;
        z-index: 100;
        transition: left 0.3s ease;
    }
    .sidebar-cell.open {
        left: 0;
    }
    .hamburger-trigger-btn {
        display: block;
    }
}

/* ==========================================================================
   MODAL AUTH SYSTEM (LOGIN / REGISTER PREMIUM GLOW)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(4, 6, 12, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
}

.modal-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.05);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-box h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.modal-box p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Tab Header (Masuk / Daftar) */
.modal-header-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.modal-tab {
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.modal-tab:hover {
    color: var(--text-main);
}

.modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Form Layout System */
.auth-form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form-group label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Input Fields Styling Premium */
.modal-box input[type="text"],
.modal-box input[type="password"] {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.modal-box input[type="text"]:focus,
.modal-box input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* Action Buttons */
.action-submit-btn {
    width: 100%;
    background-color: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.action-submit-btn:hover {
    background-color: #2563eb;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

