/* ============================================
   LEEDS International School Chatbot Interface
   Professional & Educational Design
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Professional School Theme */
    --primary-color: #2c5282;        /* Deep Blue */
    --secondary-color: #4a90e2;      /* Light Blue */
    --accent-color: #7c3aed;         /* Purple */
    --accent-hover: #6d28d9;         /* Darker Purple */
    --success-color: #10b981;        /* Green */
    --text-dark: #1a202c;
    --text-light: #4a5568;
    --text-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================
   HEADER SECTION
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.header-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    color: var(--primary-color);
}

.logo-section i {
    font-size: 32px;
    color: var(--accent-color);
}

.logo-text {
    font-weight: 700;
    font-size: 22px;
    color: var(--primary-color);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.register-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent-color);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.register-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.register-button i {
    font-size: 16px;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    overflow: hidden;
}

/* ============================================
   EMPTY STATE (When no messages)
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    opacity: 0.7;
}

.empty-state-content {
    text-align: center;
    padding: 40px;
}

.empty-state-content i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.empty-state-content p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-content span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   CHAT CONTAINER
   ============================================ */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    overflow-y: auto;
    padding: 20px;
    gap: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   CHAT MESSAGES
   ============================================ */
.chat-message {
    max-width: 75%;
    padding: 16px 20px;
    border-radius: 16px;
    margin: 4px 0;
    animation: slideIn 0.3s ease;
    word-wrap: break-word;
    box-shadow: var(--shadow-sm);
}

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

/* User Messages */
.chat-message[style*="flex-end"] {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--text-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

/* Bot Messages */
.chat-message[style*="flex-start"] {
    background: var(--bg-white);
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message p {
    margin: 8px 0;
    line-height: 1.6;
}

.chat-message ol,
.chat-message ul {
    margin: 12px 0;
    padding-left: 24px;
}

.chat-message li {
    margin: 8px 0;
    line-height: 1.6;
}

.chat-message ol {
    counter-reset: item;
}

.chat-message ol li {
    display: block;
}

/* ============================================
   INPUT SECTION
   ============================================ */
.input-section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.input-container {
    max-width: 900px;
    margin: 0 auto;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.message-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-dark);
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.5;
}

.message-input::placeholder {
    color: var(--text-light);
}

.send-button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: none;
    border-radius: 50%;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.send-button i {
    font-size: 18px;
}

.input-footer {
    margin-top: 12px;
    text-align: center;
}

.input-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.input-hint i {
    font-size: 12px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: 60px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-section i {
        font-size: 24px;
    }

    .register-button {
        padding: 10px 16px;
        font-size: 14px;
    }

    #welcomeText {
        font-size: 32px;
    }

    .welcome-subtitle {
        font-size: 16px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .chat-message {
        max-width: 85%;
    }

    .main-container {
        padding: 12px;
    }

    .input-section {
        padding: 16px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}