        :root {
            --bg-dark: #0f172a;       /* Background Utama */
            --bg-sidebar: #020617;    /* Sidebar lebih gelap */
            --bg-surface: #1e293b;    /* Bubble Chat AI */
            --accent: #38bdf8;        /* Biru Langit WYRA */
            --accent-hover: #0ea5e9;
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --border: #334155;
        }

        * {
            box-sizing: border-box;
            scrollbar-width: thin;
            scrollbar-color: var(--border) transparent;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-dark);
            color: var(--text-main);
            margin: 0;
            display: flex;
            height: 100vh;
            overflow: hidden;
        }

        /* --- 1. SIDEBAR --- */
        .sidebar {
            width: 260px;
            background-color: var(--bg-sidebar);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            padding: 1rem;
            transition: transform 0.3s ease;
        }

        .new-chat-btn {
            background-color: var(--surface);
            border: 1px solid var(--border);
            color: var(--text-main);
            padding: 0.8rem;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.2s;
            margin-bottom: 1.5rem;
        }

        .new-chat-btn:hover {
            background-color: var(--bg-surface);
            border-color: var(--accent);
        }

        .nav-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-weight: 600;
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .history-list {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .history-item {
            padding: 0.6rem;
            border-radius: 6px;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex;
            align-items: center;
            gap: 10px;
        }

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

        .user-menu {
            border-top: 1px solid var(--border);
            padding-top: 1rem;
            margin-top: auto;
        }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0.6rem;
            color: var(--text-main);
            cursor: pointer;
            border-radius: 6px;
            font-size: 0.9rem;
        }

        .menu-item:hover {
            background-color: rgba(255, 255, 255, 0.05);
        }

        /* --- 2. MAIN CONTENT --- */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* --- HEADER --- */
        header {
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.5rem;
            border-bottom: 1px solid var(--border);
            background-color: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(10px);
            z-index: 10;
        }

        .logo-area {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 700;
            font-size: 1.1rem;
            letter-spacing: -0.02em;
        }

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

        .profile-area {
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
        }

        .profile-name {
            font-size: 0.9rem;
            font-weight: 500;
        }

        .avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #38bdf8, #3b82f6);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            font-size: 0.9rem;
            border: 2px solid var(--bg-dark);
            box-shadow: 0 0 0 2px var(--accent);
        }

        /* --- CHAT AREA --- */
        #chat-window {
            flex: 1;
            overflow-y: auto;
            padding: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            scroll-behavior: smooth;
        }

        .message-wrapper {
            display: flex;
            gap: 1rem;
            max-width: 800px;
            margin: 0 auto;
            width: 100%;
            animation: fadeIn 0.3s ease;
        }

        .message-wrapper.user {
            flex-direction: row-reverse;
        }

        .msg-avatar {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .ai-avatar-icon {
            background-color: var(--accent);
            color: #000;
        }

        .user-avatar-icon {
            background-color: #475569;
            color: white;
        }

        .message-bubble {
            padding: 1rem 1.2rem;
            border-radius: 12px;
            line-height: 1.6;
            font-size: 0.95rem;
            position: relative;
            max-width: 85%;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .message-wrapper.ai .message-bubble {
            background-color: var(--bg-surface);
            border: 1px solid var(--border);
            border-top-left-radius: 2px;
        }

        .message-wrapper.user .message-bubble {
            background-color: var(--accent);
            color: #0f172a; /* Teks hitam biar kontras */
            font-weight: 500;
            border-top-right-radius: 2px;
        }

        .loading-dots::after {
            content: '...';
            animation: dots 1.5s steps(5, end) infinite;
        }

        @keyframes dots {
            0%, 20% { content: '.'; }
            40% { content: '..'; }
            60%, 100% { content: '...'; }
        }

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

        /* --- INPUT AREA --- */
        .input-container {
            padding: 1.5rem;
            background: linear-gradient(to top, var(--bg-dark) 80%, transparent);
        }

        .input-box {
            max-width: 800px;
            margin: 0 auto;
            position: relative;
            display: flex;
            align-items: center;
            background-color: var(--bg-surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 0.5rem;
            box-shadow: 0 0 15px rgba(0,0,0,0.2);
            transition: border-color 0.2s;
        }

        .input-box:focus-within {
            border-color: var(--accent);
        }

        input {
            flex: 1;
            background: transparent;
            border: none;
            color: white;
            padding: 0.8rem;
            font-size: 1rem;
            outline: none;
            font-family: 'Inter', sans-serif;
        }

        #send-btn {
            background-color: var(--accent);
            border: none;
            border-radius: 8px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: opacity 0.2s;
            color: #0f172a;
        }

        #send-btn:hover {
            opacity: 0.9;
        }

        #send-btn:disabled {
            background-color: #334155;
            cursor: not-allowed;
        }

        /* Responsive Mobile */
        @media (max-width: 768px) {
            .sidebar { display: none; } /* Hide sidebar di HP sementara */
        }