/* ============================================
   BRIGHTBOARD - MODERN DESIGN SYSTEM
   Colors from logo: Navy Blue #1a3a52, Orange #f39c12
   ============================================ */

/* CSS VARIABLES - COLOR SYSTEM */
:root {
    --navy-blue: #1a3a52;
    --navy-blue-dark: #0f2438;
    --navy-blue-light: #2c4d68;
    --orange: #f39c12;
    --orange-light: #f5b041;
    --orange-dark: #d68910;
    --cream: #f5f5dc;
    --white: #ffffff;
    --grey-light: #e8e8e8;
    --grey-dark: #4a4a4a;
    
    --shadow-sm: 0 2px 8px rgba(26, 58, 82, 0.1);
    --shadow-md: 0 4px 16px rgba(26, 58, 82, 0.15);
    --shadow-lg: 0 8px 32px rgba(26, 58, 82, 0.2);
    --shadow-xl: 0 16px 64px rgba(26, 58, 82, 0.25);
    
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* GLOBAL RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--navy-blue);
    background: linear-gradient(135deg, #e8f4f8 0%, #ffffff 50%, #fff5e6 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ANIMATED BACKGROUND */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(243, 156, 18, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(26, 58, 82, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* FLOATING PARTICLES */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* CONTAINER */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ============================================
   TOP NAVIGATION - MODERN GLASSMORPHISM
   ============================================ */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(26, 58, 82, 0.1);
    box-shadow: var(--shadow-md);
    padding: 16px 0;
    transition: var(--transition-smooth);
}

.top-nav:hover {
    box-shadow: var(--shadow-lg);
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy-blue);
    transition: var(--transition-smooth);
    padding: 8px 16px;
    border-radius: 12px;
}

.logo-link:hover {
    transform: translateY(-2px);
    background: rgba(243, 156, 18, 0.1);
}

.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

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

.nav-link {
    color: var(--navy-blue);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--orange);
    background: rgba(243, 156, 18, 0.08);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ============================================
   HERO SECTION - 3D SPINNING BOOK ANIMATION
   ============================================ */

.hero-landing {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    perspective: 2000px;
}

.hero-slogan {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-blue-light) 50%, var(--orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.1;
    animation: fadeInUp 1s ease-out;
}

.hero-subslogan {
    font-size: 1.5rem;
    color: var(--grey-dark);
    margin-bottom: 60px;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.2s both;
}

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

/* 3D ANIMATED BOOK */
.book-container {
    position: relative;
    width: 400px;
    height: 500px;
    margin: 40px auto;
    perspective: 2000px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.book-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: bookFloat 6s ease-in-out infinite, bookSpin 20s linear infinite;
    cursor: pointer;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.book-3d:hover {
    animation-play-state: paused;
    transform: rotateY(25deg) rotateX(10deg) scale(1.05);
}

@keyframes bookFloat {
    0%, 100% {
        transform: translateY(0) rotateY(0deg);
    }
    50% {
        transform: translateY(-20px) rotateY(10deg);
    }
}

@keyframes bookSpin {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--navy-blue) 0%, var(--navy-blue-dark) 100%);
    border-radius: 20px;
    box-shadow: 
        0 30px 60px rgba(26, 58, 82, 0.4),
        inset 0 2px 20px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    transform-style: preserve-3d;
    border: 3px solid rgba(243, 156, 18, 0.3);
}

.book-cover::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid rgba(243, 156, 18, 0.2);
    border-radius: 15px;
    pointer-events: none;
}

.book-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 10px 20px rgba(243, 156, 18, 0.3));
    }
    50% {
        filter: drop-shadow(0 10px 30px rgba(243, 156, 18, 0.6));
    }
}

.book-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.book-subtitle {
    font-size: 1.2rem;
    color: var(--orange-light);
    font-weight: 500;
}

/* BOOK OPENING ANIMATION */
.book-3d.opening {
    animation: bookOpen 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes bookOpen {
    0% {
        transform: rotateY(0deg) scale(1);
    }
    50% {
        transform: rotateY(90deg) scale(1.2);
    }
    100% {
        transform: rotateY(180deg) scale(0.8);
        opacity: 0;
    }
}

/* GET STARTED BUTTON */
.hero-cta-button {
    margin-top: 40px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* ============================================
   BUTTONS - MODERN 3D EFFECTS
   ============================================ */

.btn {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    box-shadow: 
        0 8px 20px rgba(243, 156, 18, 0.4),
        0 2px 8px rgba(243, 156, 18, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(243, 156, 18, 0.5),
        0 4px 16px rgba(243, 156, 18, 0.3);
}

.btn-primary:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-blue-dark) 100%);
    color: var(--white);
    box-shadow: 
        0 8px 20px rgba(26, 58, 82, 0.4),
        0 2px 8px rgba(26, 58, 82, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(26, 58, 82, 0.5),
        0 4px 16px rgba(26, 58, 82, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--navy-blue);
    border: 2px solid var(--navy-blue);
}

.btn-outline:hover {
    background: var(--navy-blue);
    color: var(--white);
    transform: translateY(-4px) scale(1.05);
}

.btn-primary-small {
    padding: 10px 24px;
    font-size: 0.95rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4);
}

/* ============================================
   CATALOG - MODERN CARD DESIGN
   ============================================ */

.catalog-header {
    text-align: center;
    padding: 60px 20px 40px;
    animation: fadeInUp 0.8s ease-out;
}

.catalog-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.catalog-subtitle {
    font-size: 1.3rem;
    color: var(--grey-dark);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

.catalog-content {
    padding: 40px 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.tool-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(26, 58, 82, 0.1);
    animation: fadeInUp 0.6s ease-out both;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }

.tool-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        var(--shadow-xl),
        0 0 0 3px rgba(243, 156, 18, 0.1);
    border-color: var(--orange);
}

.tool-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.tool-card:hover .tool-icon {
    animation: iconSpin 0.6s ease-in-out;
}

@keyframes iconSpin {
    0% {
        transform: rotateY(0deg) scale(1);
    }
    50% {
        transform: rotateY(180deg) scale(1.2);
    }
    100% {
        transform: rotateY(360deg) scale(1);
    }
}

.tool-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy-blue);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.tool-description {
    font-size: 1.05rem;
    color: var(--grey-dark);
    line-height: 1.6;
    margin-bottom: 28px;
}

.tool-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* ============================================
   FORMS - MODERN PROFESSIONAL STYLING
   ============================================ */

.form-container {
    max-width: 500px;
    margin: 60px auto;
    background: var(--white);
    border-radius: 24px;
    padding: 50px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(26, 58, 82, 0.1);
}

.form-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    text-align: center;
    color: var(--grey-dark);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--navy-blue);
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(26, 58, 82, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition-smooth);
    background: var(--white);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
    transform: translateY(-2px);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    margin-top: 12px;
}

.form-link {
    text-align: center;
    margin-top: 24px;
    color: var(--grey-dark);
}

.form-link a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.form-link a:hover {
    color: var(--orange-dark);
    text-decoration: underline;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    border-left: 4px solid;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-color: #22c55e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: #ef4444;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #b45309;
    border-color: #fbbf24;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-color: #3b82f6;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--grey-dark);
    font-size: 0.95rem;
    margin-top: 80px;
    border-top: 1px solid rgba(26, 58, 82, 0.1);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .hero-slogan {
        font-size: 2.5rem;
    }
    
    .hero-subslogan {
        font-size: 1.2rem;
    }
    
    .book-container {
        width: 300px;
        height: 375px;
    }
    
    .book-title {
        font-size: 2rem;
    }
    
    .catalog-title {
        font-size: 2.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .form-container {
        padding: 30px;
        margin: 40px 20px;
    }
    
    .top-nav-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .nav-center {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
    border: 4px solid rgba(26, 58, 82, 0.1);
    border-top: 4px solid var(--orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* ============================================
   DASHBOARD LAYOUT - CHAT INTERFACE
   ============================================ */

.dashboard-layout {
    display: flex;
    height: 100vh;
    background: var(--white);
}

/* SIDEBAR */
.sidebar {
    width: 300px;
    background: linear-gradient(180deg, var(--navy-blue) 0%, var(--navy-blue-dark) 100%);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(26, 58, 82, 0.2);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}

.btn-new-chat {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-new-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.conversation-item {
    padding: 14px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.conversation-item.active {
    background: rgba(243, 156, 18, 0.2);
    border-color: var(--orange);
}

.conversation-title {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.conversation-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.delete-conversation-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-smooth);
    font-size: 0.75rem;
}

.conversation-item:hover .delete-conversation-btn {
    opacity: 1;
}

.saved-indicator {
    color: var(--orange);
    font-size: 0.9rem;
    margin-right: 6px;
}

.loading-text {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--cream);
}

.top-header {
    padding: 20px 30px;
    background: var(--white);
    border-bottom: 2px solid rgba(26, 58, 82, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-left h2 {
    color: var(--navy-blue);
    font-size: 1.5rem;
    font-weight: 800;
}

.header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-right .user-name {
    color: var(--grey-dark);
    font-weight: 600;
}

.header-right a {
    color: var(--navy-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.header-right a:hover {
    background: rgba(243, 156, 18, 0.1);
    color: var(--orange);
}

.btn-save-conversation {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-save-conversation:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4);
}

/* CHAT AREA */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

.chat-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-bubble {
    max-width: 75%;
    padding: 16px 20px;
    border-radius: 16px;
    line-height: 1.6;
    animation: messageSlideIn 0.3s ease-out;
}

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

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
    border-bottom-right-radius: 4px;
}

.assistant-message {
    align-self: flex-start;
    background: var(--white);
    color: var(--navy-blue);
    box-shadow: 0 4px 12px rgba(26, 58, 82, 0.1);
    border: 1px solid rgba(26, 58, 82, 0.1);
    border-bottom-left-radius: 4px;
}

.message-content {
    word-wrap: break-word;
}

.message-content h3,
.message-content h4 {
    color: var(--navy-blue);
    margin-top: 16px;
    margin-bottom: 8px;
}

.message-content ul,
.message-content ol {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.message-content a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
}

.message-content a:hover {
    text-decoration: underline;
}

.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.message-content th,
.message-content td {
    padding: 10px;
    border: 1px solid rgba(26, 58, 82, 0.2);
    text-align: left;
}

.message-content th {
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-blue-light) 100%);
    color: var(--white);
    font-weight: 700;
}

.message-content tr:nth-child(even) {
    background: rgba(26, 58, 82, 0.05);
}

/* TYPING INDICATOR */
.typing-indicator {
    padding: 16px 20px;
    max-width: 75px;
    background: var(--white);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(26, 58, 82, 0.1);
    align-self: flex-start;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    30% {
        transform: scale(1.4);
        opacity: 1;
    }
}

/* CHAT INPUT */
.chat-input-container {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--white);
    border-top: 2px solid rgba(26, 58, 82, 0.1);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

#chat-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(26, 58, 82, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    max-height: 150px;
    transition: var(--transition-smooth);
}

#chat-input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
}

.btn-send {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4);
}

.btn-send:active {
    transform: translateY(0);
}

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

/* SUBSCRIPTION BANNER */
.subscription-banner {
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-blue-light) 100%);
    color: var(--white);
    padding: 40px;
    text-align: center;
    border-radius: 16px;
    margin: 40px;
    box-shadow: var(--shadow-lg);
}

.subscription-banner h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.subscription-banner p {
    margin-bottom: 24px;
    font-size: 1.1rem;
}

/* WELCOME MESSAGE */
.welcome-message {
    margin-bottom: 20px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .message-bubble {
        max-width: 90%;
    }
}
