:root {
    --bg-color: #212121;
    --sidebar-bg: #171717;
    --chat-bg: transparent;
    /* Seamless */
    --primary-color: #ffffff;
    --primary-hover: #ececec;
    --text-primary: #ececec;
    --text-secondary: #b4b4b4;
    --border-color: #444;
    --glass-border: none;
    --glass-shadow: none;
    --blur-strength: 0px;
    --font-main: 'Inter', sans-serif;
    --user-msg-bg: #2f2f2f;
    --input-bg: #2f2f2f;
    --border-color: #262626;
    /* neutral-800 */
    --hover-bg: #262626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* CONTAINER */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    /* Standard ChatGPT sidebar width */
    background: var(--sidebar-bg);
    border-right: 1px solid #333;
    border-right: var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
    z-index: 10;
}

.profile-header {
    text-align: center;
}

.avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    background-color: #10b981;
    border-radius: 50%;
    border: 2px solid var(--bg-color);
}

.profile-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.role {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* QUICK ACTIONS */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* CHAT INTERFACE */
.chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    position: relative;
}

.chat-header {
    padding: 1rem 2rem;
    border-bottom: var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* MESSAGES AREA */
.chat-scroll-wrapper {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    scroll-behavior: smooth;
}

.messages-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    max-width: 80%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    position: relative;
    line-height: 1.5;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-out;
}

.message.bot {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding-left: 0;
    font-size: 1rem;
}

.message.user {
    align-self: flex-end;
    background: var(--user-msg-bg);
    color: var(--text-primary);
    border-radius: 20px;
    font-weight: 500;
}

.typing-indicator {
    padding: 1rem;
    display: flex;
    gap: 4px;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* INPUT AREA */
.input-area {
    padding: 1.5rem 2rem;
    border-top: var(--glass-border);
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

#chat-form {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 900px;
}

#user-input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid #444;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    /* Capsule shape */
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#user-input:focus {
    border-color: #666;
    background: var(--input-bg);
}

#send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: black;
    /* Fixed: Icon color needs to be dark on white background */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

#send-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    justify-content: center;
    width: 100%;
}

.suggestion-chip {
    background: var(--input-bg);
    border: 1px solid #444;
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggestion-chip:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    padding-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
}

.video-card h3 {
    padding: 0 1rem;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.video-card p {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        transform: translateX(-100%);
        height: 100%;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .message {
        max-width: 90%;
    }
}