/* ==================== CHATITI COMPLETE PREMIUM CSS - PERPLEXITY STYLE ==================== */
/* Created by Anand Kathalewar - World-Class Professional Quality */
/* Version: 3.0 - Perplexity-Inspired Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #0f172a;
    color: #e2e8f0;
}

/* ==================== MODAL STYLES (PREMIUM CHATGPT STYLE) ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.btn-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: rotate(90deg);
}

.btn-close:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-form {
    padding: 32px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.modal-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    color: #0f172a;
}

.modal-form input:hover {
    border-color: #cbd5e1;
}

.modal-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-form input::placeholder {
    color: #94a3b8;
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.4);
}

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

.form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
    color: #64748b;
}

.form-footer a,
.form-footer .link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    cursor: pointer;
}

.form-footer a:hover,
.form-footer .link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ==================== NOTIFICATIONS ==================== */

.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.2);
    max-width: 380px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* ==================== LANDING PAGE ==================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.brand-creator {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.navbar-actions {
    display: flex;
    gap: 12px;
}

.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

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

.hero-title {
    font-size: 64px;
    color: white;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    color: white;
    font-size: 15px;
    font-weight: 500;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 18px 40px;
    background: white;
    color: #6366f1;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: white;
    padding: 12px 28px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.features-section {
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    color: white;
    margin-bottom: 16px;
    font-weight: 700;
}

.section-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 22px;
    color: white;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.creator-section {
    padding: 80px 20px;
}

.creator-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 32px;
    align-items: center;
}

.creator-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.creator-info h3 {
    font-size: 28px;
    color: white;
    margin-bottom: 8px;
    font-weight: 700;
}

.creator-title {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.creator-experience {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.creator-stats {
    display: flex;
    gap: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.cta-section {
    padding: 80px 20px;
    text-align: center;
}

.cta-section h2 {
    font-size: 42px;
    color: white;
    margin-bottom: 16px;
    font-weight: 700;
}

.cta-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.btn-cta-large {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    background: white;
    color: #6366f1;
    border: none;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.25);
}

.btn-cta-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.35);
}

/* ==================== CHAT APP - PERPLEXITY STYLE ==================== */

.chat-app {
    display: none;
    height: 100vh;
    background: #0f172a;
}

/* Sidebar - Professional Left Panel */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sidebar-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.btn-new-chat {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-new-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.4);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.chat-history-section {
    margin-bottom: 24px;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-history-item {
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-history-item:hover {
    background: #334155;
}

.chat-history-item.active {
    background: #334155;
    color: white;
    font-weight: 500;
}

.sidebar-footer {
    border-top: 1px solid #334155;
    padding: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #0f172a;
    border-radius: 10px;
    margin-bottom: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #334155;
    color: white;
}

.user-dropdown {
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #334155;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.user-dropdown a:hover {
    background: #334155;
    color: white;
}

.creator-credit {
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.creator-credit strong {
    color: #cbd5e1;
    font-weight: 600;
}

/* Main Chat Area - Perplexity Style Center Layout */
.chat-main {
    margin-left: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0f172a;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.chat-container::-webkit-scrollbar-track {
    background: #1e293b;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* Welcome Screen - Perplexity Center Style */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.welcome-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.welcome-icon {
    margin-bottom: 32px;
    animation: bounce 2s ease-in-out infinite;
}

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

.welcome-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    font-size: 18px;
    color: #94a3b8;
    margin-bottom: 48px;
}

/* Suggestion Cards - Horizontal Row like Perplexity */
.suggestion-cards {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.suggestion-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 24px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.suggestion-card:hover {
    background: #334155;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.3);
}

.suggestion-icon {
    font-size: 18px;
}

.suggestion-text {
    font-size: 14px;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    padding: 40px 20px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.message {
    margin-bottom: 32px;
    animation: messageSlideIn 0.4s ease;
}

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

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.message-role {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.message-content {
    background: #1e293b;
    padding: 20px 24px;
    border-radius: 16px;
    color: #e2e8f0;
    line-height: 1.7;
    font-size: 15px;
    border: 1px solid #334155;
}

.message.user .message-content {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
}

.message-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #0f172a;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #334155;
}

.message-file .file-icon {
    font-size: 20px;
}

.message-file .file-name {
    font-weight: 600;
    color: #818cf8;
    font-size: 14px;
}

.message-file .file-size {
    color: #64748b;
    font-size: 12px;
}

/* Chat Input - Perplexity Center Style */
.chat-input-container {
    padding: 24px 20px 32px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
}

.chat-input-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 18px 24px;
    background: #1e293b;
    border: 1.5px solid #334155;
    border-radius: 16px;
    color: #e2e8f0;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 60px;
    max-height: 200px;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.chat-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #1e293b;
}

.chat-input::placeholder {
    color: #64748b;
}

.btn-send {
    padding: 18px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.5);
}

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

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

/* File Upload Section - Below Input */
.file-upload-section {
    max-width: 900px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#fileInput {
    display: none;
}

.btn-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1e293b;
    color: #818cf8;
    border: 1px solid #334155;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: #334155;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-upload svg {
    width: 18px;
    height: 18px;
}

.file-display-area {
    display: none;
    max-width: 900px;
    margin: 0 auto 12px;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    font-size: 24px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.file-size {
    font-size: 12px;
    color: #94a3b8;
}

.btn-remove-file {
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    cursor: pointer;
    color: #f87171;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.chat-input-footer {
    max-width: 900px;
    margin: 12px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-hint strong {
    color: #94a3b8;
    font-weight: 600;
}

.creator-badge-input {
    color: #64748b;
    font-weight: 500;
}

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

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .chat-main {
        margin-left: 240px;
    }
    
    .welcome-title {
        font-size: 40px;
    }
    
    .chat-input-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .chat-main {
        margin-left: 0;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-header {
        padding: 24px 20px 20px;
    }
    
    .modal-form {
        padding: 24px 20px;
    }
    
    .welcome-title {
        font-size: 32px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
    }
    
    .suggestion-cards {
        flex-direction: column;
        align-items: stretch;
    }
    
    .suggestion-card {
        width: 100%;
        justify-content: center;
    }
    
    .chat-messages {
        padding: 20px 16px;
    }
    
    .chat-input-container {
        padding: 16px;
    }
    
    .chat-input-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .creator-card {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title {
        font-size: 42px;
    }
}

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

.hidden {
    display: none !important;
}

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #6366f1;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ==================== COPY BUTTON & PROFESSIONAL SIDEBAR CSS ==================== */
/* Add this to your existing styles_COMPLETE_PREMIUM.css */
/* Version: 3.1 - Copy Functionality + Professional Sidebar */

/* ==================== COPY BUTTON STYLES (CHATGPT-STYLE) ==================== */

.message {
    position: relative;
    margin-bottom: 32px;
    animation: messageSlideIn 0.4s ease;
}

.message.assistant .message-content {
    position: relative;
    padding-right: 60px; /* Make room for copy button */
}

.message-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.btn-copy:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(99, 102, 241, 0.5);
    color: #e2e8f0;
    transform: translateY(-1px);
}

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

.btn-copy svg {
    width: 16px;
    height: 16px;
}

/* Copy button for user messages (different color) */
.message.user .message-actions .btn-copy {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.message.user .message-actions .btn-copy:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

/* Copy tooltip */
.btn-copy::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    padding: 6px 10px;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid #334155;
    z-index: 1000;
}

.btn-copy:hover::after {
    opacity: 1;
}

/* Copied state */
.btn-copy.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
}

.btn-copy.copied::after {
    content: 'Copied!';
    opacity: 1;
    background: #10b981;
    color: white;
}

/* Text selection enabled */
.message-content {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* ==================== PROFESSIONAL SIDEBAR ICONS ==================== */

/* Remove white background from chat history icons */
.chat-history-item {
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Professional chat icon (no white background) */
.chat-history-item::before {
    content: '';
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.chat-history-item:hover::before {
    opacity: 1;
}

.chat-history-item:hover {
    background: #334155;
}

.chat-history-item.active {
    background: #334155;
    color: white;
    font-weight: 500;
}

.chat-history-item.active::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z'/%3E%3C/svg%3E");
    opacity: 1;
}

/* Delete button on hover (professional) */
.chat-history-item .btn-delete-chat {
    position: absolute;
    right: 8px;
    padding: 4px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    color: #f87171;
    opacity: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.chat-history-item .btn-delete-chat:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* ==================== ENHANCED USER AVATAR ==================== */

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 2px solid #334155;
}

/* ==================== PROFESSIONAL SIDEBAR LOGO ==================== */

.sidebar-logo svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ==================== NEW CHAT BUTTON ENHANCEMENT ==================== */

.btn-new-chat {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-new-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.5);
}

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

.btn-new-chat svg {
    width: 18px;
    height: 18px;
}

/* ==================== ENHANCED SECTION LABELS ==================== */

.section-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    padding: 0 4px;
}

/* ==================== SMOOTH SCROLLBAR FOR SIDEBAR ==================== */

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ==================== MOBILE RESPONSIVE FIXES ==================== */

@media (max-width: 768px) {
    .message.assistant .message-content {
        padding-right: 50px;
    }
    
    .message-actions {
        opacity: 1; /* Always visible on mobile */
    }
    
    .btn-copy::after {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==================== ANIMATION FOR COPY SUCCESS ==================== */

@keyframes copySuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.btn-copy.copied {
    animation: copySuccess 0.3s ease;
}

/* ==================== TEXT SELECTION HIGHLIGHTING ==================== */

.message-content::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

.message-content::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}
/* ==================== CHAT TITLES & PROMPT CREATOR CSS ==================== */
/* Add this to your styles.css */
/* Version: 3.2 - Smart Chat Titles + Prompt Creator */

/* ==================== PROMPT CREATOR BUTTON ==================== */

.prompt-creator-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    margin-bottom: 4px;
}

.prompt-creator-button:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(245, 158, 11, 0.5);
}

.prompt-creator-button:active {
    transform: translateY(0);
}

.prompt-creator-button svg {
    flex-shrink: 0;
}

/* ==================== ENHANCED CHAT HISTORY ITEMS ==================== */

.chat-history-item {
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    width: 100%;
}

.chat-history-item::before {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    margin-right: 6px;
}

.chat-history-item:hover {
    background: #334155;
}

.chat-history-item:hover::before {
    opacity: 1;
}

.chat-history-item.active {
    background: #334155;
    color: white;
    font-weight: 500;
}

.chat-history-item.active::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z'/%3E%3C/svg%3E");
    opacity: 1;
}

/* Delete button */
.btn-delete-chat {
    display: none;
    padding: 4px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    color: #f87171;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-history-item:hover .btn-delete-chat {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-chat:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.btn-delete-chat svg {
    width: 14px;
    height: 14px;
}

/* ==================== NO CHATS MESSAGE ==================== */

.no-chats {
    padding: 12px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-style: italic;
}

/* ==================== CHAT TITLE TRUNCATION ==================== */

.chat-history-item {
    max-width: 100%;
    line-height: 1.4;
}

/* Allow title to wrap if needed on mobile */
@media (max-width: 768px) {
    .chat-history-item {
        white-space: normal;
        padding-right: 40px; /* Make room for delete button */
    }
}

/* ==================== PROMPT CREATOR SPECIAL STYLING ==================== */

/* Special icon for Prompt Creator chats */
.chat-history-item:has([data-prompt-creator])::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f59e0b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 2L2 7l10 5 10-5-10-5z M2 17l10 5 10-5 M2 12l10 5 10-5'/%3E%3C/svg%3E");
}

/* ==================== AI TOOLS SECTION ==================== */

.chat-history-section {
    margin-bottom: 24px;
}

/* First section (AI Tools) should have less bottom margin */
.sidebar-content .chat-history-section:first-child {
    margin-bottom: 16px;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    padding: 0 4px;
}

/* ==================== LOADING STATE FOR TITLE GENERATION ==================== */

.chat-history-item.generating-title {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.chat-history-item.generating-title::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 12px;
    height: 12px;
    border: 2px solid #64748b;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== ENHANCED SIDEBAR SCROLLBAR ==================== */

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scroll-behavior: smooth;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */

@media (max-width: 768px) {
    .prompt-creator-button {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .chat-history-item {
        font-size: 13px;
        padding: 10px;
    }
    
    .section-label {
        font-size: 10px;
    }
}

/* ==================== HOVER EFFECTS ENHANCEMENT ==================== */

.prompt-creator-button,
.chat-history-item,
.btn-delete-chat {
    -webkit-tap-highlight-color: transparent;
}

/* ==================== FOCUS STATES (ACCESSIBILITY) ==================== */

.prompt-creator-button:focus,
.chat-history-item:focus,
.btn-delete-chat:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ==================== ANIMATION FOR NEW ITEMS ==================== */

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

.chat-history-item {
    animation: slideInFromLeft 0.3s ease;
}

/* ==================== SPECIAL STYLING FOR PROMPT CREATOR MESSAGES ==================== */

.message.assistant .message-content:has(.prompt-creator-welcome) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-left: 3px solid #f59e0b;
}