/* ============================== */
/* ENES'E SOR (AI TUTOR) STYLES   */
/* ============================== */

.tutor-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 500px;
}

/* Header */
.tutor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 1rem;
}

.tutor-avatar {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
}

.enes-avatar {
    background: linear-gradient(135deg, #FF6B6B, #845EC2);
    box-shadow: 0 4px 15px rgba(132, 94, 194, 0.3);
}

.tutor-info {
    flex: 1;
}

.tutor-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.tutor-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
}

/* Quick Actions Grid */
.quick-actions {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.quick-actions h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.action-icon {
    font-size: 1.5rem;
}

.action-label {
    font-size: 0.75rem;
    text-align: center;
}

/* Specific button colors */
.kpss-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.burc-btn:hover {
    background: rgba(156, 39, 176, 0.2);
    border-color: #9C27B0;
}

.fal-btn:hover {
    background: rgba(121, 85, 72, 0.2);
    border-color: #795548;
}

.selfie-btn:hover {
    background: rgba(233, 30, 99, 0.2);
    border-color: #E91E63;
}

.question-btn:hover {
    background: rgba(255, 152, 0, 0.2);
    border-color: #FF9800;
}

.chat-btn:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196F3;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
}

.chat-message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.ai-message {
    align-self: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #E91E63, #FF5722);
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #845EC2, #FF6B6B);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    object-fit: cover;
}

.message-text {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.user-message .message-text {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message .message-text {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
}

.user-message .message-time {
    text-align: right;
}

/* Image Preview Area */
.image-preview-area {
    position: relative;
    display: inline-block;
    margin: 0.5rem 1rem;
    align-self: flex-start;
}

.preview-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.clear-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.clear-image-btn i {
    width: 14px;
    height: 14px;
}

/* Mode Indicator */
.mode-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 0 1rem 0.5rem;
}

.mode-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(132, 94, 194, 0.2);
    color: #845EC2;
}

.mode-badge.kpss-mode {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.mode-badge.burc-mode {
    background: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.mode-badge.fal-mode {
    background: rgba(121, 85, 72, 0.2);
    color: #A1887F;
}

.mode-badge.selfie-mode {
    background: rgba(233, 30, 99, 0.2);
    color: #E91E63;
}

.mode-badge.question-mode {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.clear-mode-btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.clear-mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.clear-mode-btn i {
    width: 12px;
    height: 12px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.4s infinite both;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-4px);
    }
}

/* Input Area */
.chat-input-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.upload-btn {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.upload-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: var(--accent);
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-btn i {
    width: 20px;
    height: 20px;
}

.chat-input {
    flex: 1;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-btn:hover:not(:disabled) {
    background: var(--accent);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn i {
    width: 20px;
    height: 20px;
}

.input-hints {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 600px) {
    .tutor-container {
        height: calc(100vh - 140px);
    }

    .chat-message {
        max-width: 90%;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}