/* ===== CSK MENTOR PAGE ===== */

/* Hero variation with animated background */
.mentor-header .page-header {
    background: linear-gradient(135deg, #0F4CFF 0%, #2a1b6e 50%, #6b1fa3 100%);
    padding: 80px 0 60px; position: relative; overflow: hidden;
}
.mentor-header .page-header::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(255,215,0,0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(155,89,182,0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(15,76,255,0.1) 0%, transparent 50%);
    animation: headerBgShift 8s ease-in-out infinite alternate;
}
@keyframes headerBgShift {
    0% { transform: scale(1) translate(0,0); }
    100% { transform: scale(1.1) translate(2%,1%); }
}
.mentor-header-content {
    text-align: center; max-width: 650px; margin: 0 auto;
    position: relative; z-index: 2; animation: mentorEntrance 0.8s ease;
}
@keyframes mentorEntrance {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
.mentor-header-icon {
    width: 80px; height: 80px; border-radius: 24px; margin: 0 auto 20px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; color: #fff; border: 1px solid rgba(255,255,255,0.2);
    animation: mentorFloat 3s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(255,255,255,0.1);
}
@keyframes mentorFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.mentor-header-content h1 {
    font-size: 2.8rem; font-weight: 800; color: #fff;
    font-family: 'Poppins', sans-serif; margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.mentor-header-content p { font-size: 1.05rem; color: rgba(255,255,255,0.85); line-height: 1.7; }

/* Layout */
.mentor-section { padding: 60px 0 80px; background: var(--bg-color); }
.mentor-layout { display: grid; grid-template-columns: 1fr 280px; gap: 30px; align-items: start; }

/* Chat Container */
.mentor-chat-container {
    background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 2px 20px var(--shadow-color); border: 1px solid var(--border-color);
    display: flex; flex-direction: column; height: 600px;
    animation: containerIn 0.6s ease 0.2s both;
}
@keyframes containerIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.mentor-chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}
.mentor-chat-status { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; color: var(--text-color); }
.mentor-status-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #2ECC71;
    transition: background 0.3s; animation: statusPulse 2s ease-in-out infinite;
}
.mentor-status-dot.offline { background: #e74c3c; animation: none; }
@keyframes statusPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(46,204,113,0.4); } 50% { box-shadow: 0 0 0 6px rgba(46,204,113,0); } }
/* Messages */
.mentor-messages {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 16px;
}
.mentor-msg { display: flex; gap: 10px; max-width: 85%; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mentor-msg.mentor-user { margin-left: auto; flex-direction: row-reverse; }
.mentor-msg-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.mentor-msg.mentor-bot .mentor-msg-avatar { background: rgba(15,76,255,0.1); color: #0F4CFF; }
.mentor-msg.mentor-user .mentor-msg-avatar { background: rgba(155,89,182,0.1); color: #9B59B6; }
.mentor-msg-content { display: flex; flex-direction: column; gap: 4px; }
.mentor-msg-bubble {
    padding: 12px 16px; border-radius: 16px; line-height: 1.7; font-size: 0.92rem;
}
.mentor-msg.mentor-bot .mentor-msg-bubble {
    background: var(--bg-light); color: var(--text-color); border-bottom-left-radius: 4px;
}
.mentor-msg.mentor-user .mentor-msg-bubble {
    background: #0F4CFF; color: #fff; border-bottom-right-radius: 4px;
}
.mentor-msg-time { font-size: 0.7rem; color: var(--text-light); padding: 0 4px; }
.mentor-msg.mentor-user .mentor-msg-time { text-align: right; }

/* Typing indicator */
.mentor-typing .mentor-msg-bubble {
    display: flex; align-items: center; gap: 4px; padding: 14px 20px;
}
.mentor-typing .typing-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-light);
    animation: typingDot 1.4s infinite;
}
.mentor-typing .typing-dot:nth-child(2) { animation-delay: 0.2s; }
.mentor-typing .typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%,60%,100% { opacity: 0.3; } 30% { opacity: 1; } }

/* Input area */
.mentor-input-area { border-top: 1px solid var(--border-color); padding: 16px 20px 12px; animation: inputSlide 0.5s ease 0.5s both; }
@keyframes inputSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mentor-input-wrapper {
    display: flex; gap: 10px; align-items: flex-end;
    background: var(--bg-light); border-radius: 14px; padding: 4px 4px 4px 16px;
    border: 2px solid transparent; transition: border-color 0.3s;
}
.mentor-input-wrapper:focus-within { border-color: #0F4CFF; background: #fff; }
.mentor-input {
    flex: 1; border: none; outline: none; background: transparent;
    font-family: inherit; font-size: 0.92rem; padding: 10px 0; resize: none;
    max-height: 120px; color: var(--text-color); line-height: 1.5;
}
.mentor-input::placeholder { color: var(--text-light); }
.mentor-send-btn {
    width: 42px; height: 42px; border-radius: 12px; border: none;
    background: #0F4CFF; color: #fff; font-size: 1rem; cursor: pointer;
    transition: all 0.3s; flex-shrink: 0;
}
.mentor-send-btn:hover { background: #0b3ecc; transform: scale(1.05); }
.mentor-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.mentor-input-footer {
    display: flex; justify-content: space-between; margin-top: 8px;
    font-size: 0.72rem; color: var(--text-light);
}
.mentor-input-footer span { opacity: 0.7; }

/* Sidebar */
.mentor-sidebar { display: flex; flex-direction: column; gap: 20px; }
.mentor-suggestion-card { animation: sidebarIn 0.6s ease 0.3s both; }
.mentor-info-card { animation: sidebarIn 0.6s ease 0.4s both; }
@keyframes sidebarIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.mentor-suggestion-card, .mentor-info-card {
    background: #fff; border-radius: 16px; padding: 20px;
    box-shadow: 0 2px 16px var(--shadow-color); border: 1px solid var(--border-color);
}
.mentor-suggestion-card h4, .mentor-info-card h4 {
    font-size: 0.9rem; font-weight: 600; margin-bottom: 14px; color: var(--text-color);
    display: flex; align-items: center; gap: 8px;
}
.mentor-suggestion-card h4 i { color: #0F4CFF; }
.mentor-suggestions { display: flex; flex-direction: column; gap: 8px; }
.mentor-suggestion {
    padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-color);
    background: var(--bg-light); color: var(--text-color); font-size: 0.85rem; text-align: left;
    cursor: pointer; transition: all 0.3s; font-family: inherit;
}
.mentor-suggestion:hover { background: rgba(15,76,255,0.06); border-color: #0F4CFF; color: #0F4CFF; transform: translateX(4px); }
.mentor-suggestion:active { transform: scale(0.98); }
.mentor-powered {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: rgba(15,76,255,0.06); border-radius: 10px; border: 1px solid rgba(15,76,255,0.12);
}
.mentor-powered i { font-size: 1.4rem; color: #0F4CFF; }
.mentor-powered span { font-weight: 600; color: #0F4CFF; font-size: 0.9rem; }

/* Toast */
.mentor-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: #1a1a2e; color: #fff; padding: 12px 24px; border-radius: 12px;
    font-size: 0.88rem; z-index: 1200; opacity: 0; transition: all 0.4s ease;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2); pointer-events: none;
}
.mentor-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Code in messages */
.mentor-msg-bubble code {
    background: rgba(0,0,0,0.06); padding: 1px 6px; border-radius: 4px; font-size: 0.85em;
    font-family: 'Consolas', 'Monaco', monospace;
}
.mentor-msg.mentor-user .mentor-msg-bubble code { background: rgba(255,255,255,0.15); }
.mentor-msg-bubble pre {
    background: #1a1a2e; color: #e0e0e0; padding: 12px 16px; border-radius: 10px;
    overflow-x: auto; margin: 8px 0; font-size: 0.85rem;
}
.mentor-msg-bubble pre code { background: none; padding: 0; color: inherit; }

/* Responsive */
@media (max-width: 900px) {
    .mentor-layout { grid-template-columns: 1fr; }
    .mentor-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .mentor-chat-container { height: 500px; }
    .mentor-header-content h1 { font-size: 2rem; }
}
@media (max-width: 600px) {
    .mentor-sidebar { grid-template-columns: 1fr; }
    .mentor-chat-container { height: calc(100vh - 320px); border-radius: 0; margin: 0 -16px; }
    .mentor-section { padding: 30px 0 40px; }
    .mentor-header-content h1 { font-size: 1.6rem; }
    .mentor-header-icon { width: 60px; height: 60px; font-size: 1.6rem; border-radius: 18px; }
    .mentor-msg { max-width: 92%; }
}
