:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --accent-color: #8b5cf6;
}

.neumorphic {
    border-radius: 1rem;
    background: #e0e5ec;
    box-shadow:  10px 10px 20px #b8b9be, 
                -10px -10px 20px #ffffff;
}
.neumorphic-inset {
    border-radius: 1rem;
    background: #e0e5ec;
    box-shadow: inset 5px 5px 10px #b8b9be, 
                inset -5px -5px 10px #ffffff;
}
.neumorphic-btn {
    border-radius: 0.5rem;
    background: #e0e5ec;
    box-shadow:  5px 5px 10px #b8b9be, 
                -5px -5px 10px #ffffff;
    transition: all 0.2s ease;
}
.neumorphic-btn:active {
    box-shadow: inset 3px 3px 6px #b8b9be, 
                inset -3px -3px 6px #ffffff;
}
.neumorphic-btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow:  5px 5px 10px #b8b9be, 
                -5px -5px 10px #ffffff;
}
.neumorphic-btn-primary:active {
    box-shadow: inset 3px 3px 6px #4338ca, 
                inset -3px -3px 6px #6366f1;
}
body {
    background-color: #e0e5ec;
    font-family: 'Inter', sans-serif;
    background-image: linear-gradient(135deg, #e0e5ec 0%, #d1d9e8 100%);
    min-height: 100vh;
}
.history-item {
    transition: all 0.2s ease;
    cursor: pointer;
}
.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

.loading-text {
    display: inline-flex;
    align-items: center;
}

/* Variation button */
.variation-btn {
    position: relative;
    overflow: hidden;
}

.variation-btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.2);
    transform: rotate(30deg) translate(0, -200%);
    transition: all 0.5s ease;
}

.variation-btn:hover::after {
    transform: rotate(30deg) translate(0, 200%);
}

/* Resizable textarea */
textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
}

/* Header enhancements */
.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.9;
}

/* History enhancements */
.history-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

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

.history-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.history-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e0e5ec;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

.history-text {
    flex: 1;
    min-width: 0;
}

.history-prompt {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.floating-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Enhanced Prompt Section */
.enhanced-prompt-container {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    background: rgba(79, 70, 229, 0.05);
    margin-top: 1rem;
    overflow: hidden;
    max-height: 50px;
    transition: max-height 0.4s ease;
}

.enhanced-prompt-container.expanded {
    max-height: 350px;
}

.prompt-suggestion {
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 5px 5px 10px #b8b9be, 
               -5px -5px 10px #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.prompt-suggestion:hover {
    transform: translateY(-3px);
    box-shadow: 8px 8px 15px #b8b9be, 
               -8px -8px 15px #ffffff;
}

.copy-btn {
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: #4338ca;
}

/* Textarea improvements */
.prompt-textarea {
    min-height: 120px;
    max-height: 300px;
    resize: vertical;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.fullscreen-textarea {
    width: 90%;
    height: 80%;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    resize: none;
}

.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.text-area-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}

.text-area-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.text-area-btn:hover {
    background: rgba(79, 70, 229, 0.2);
}

.text-area-btn i {
    color: var(--primary-color);
    font-size: 14px;
}

.logo-upload-container {
    position: relative;
    cursor: pointer;
}

.logo-upload-container:hover::after {
    content: 'Change Logo';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    text-align: center;
    padding: 5px;
}

/* Preview container */
.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Clear button */
.clear-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.textarea-container {
    position: relative;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #e0e5ec;
    box-shadow: 5px 5px 10px #b8b9be, 
               -5px -5px 10px #ffffff;
    color: #4f46e5;
    font-size: 1.25rem;
}

.tab-btn:hover {
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #4f46e5;
    color: white;
    box-shadow: inset 3px 3px 6px #4338ca, 
                inset -3px -3px 6px #6366f1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Analysis tool specific styles */
.copied {
    background-color: #10b981 !important;
}

.border-primary {
    border-color: #4f46e5;
}

#uploadArea {
    transition: all 0.2s ease;
}

.model-vision-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 2px 6px;
    border-radius: 4px;
}

.model-info {
    background: rgba(79, 70, 229, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

/* Prompt generator specific styles */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.loading-dots div {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4f46e5;
    animation: bounce 1.5s infinite ease-in-out;
}

.loading-dots div:nth-child(1) {
    animation-delay: -0.3s;
}

.loading-dots div:nth-child(2) {
    animation-delay: -0.15s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.model-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 0.9rem 1.25rem;
    border-radius: 0.75rem;
    background: #e0e5ec;
    box-shadow: inset 3px 3px 6px #b8b9be, 
               inset -3px -3px 6px #ffffff;
    border: none;
    color: #1e293b;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
}

.model-select-container {
    position: relative;
}

.model-select-container::after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
}

/* Character Generator Styles */
.neuromorphic-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 5px 5px 10px #d1d9e6, -5px -5px 10px #ffffff;
}

.visualization-card {
    background: #f8fafc;
    border-radius: 8px;
    box-shadow: inset 2px 2px 5px #d1d9e6, inset -2px -2px 5px #ffffff;
}

.category-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #4f46e5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 6px;
}

.token-chip {
    background: #e0e7ff;
    color: #4f46e5;
    padding: 2px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-family: monospace;
}

#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #4f46e5;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    position: fixed;
    z-index: 1;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.5s, visibility 0.5s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
}

/* Chat Tab Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    max-height: 80vh;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-input-container {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    resize: none;
}

.send-button {
    margin-left: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #4338ca;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 80%;
}

.user-message {
    background-color: #e0e7ff;
    color: #4f46e5;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.bot-message {
    background-color: #f3f4f6;
    color: #111827;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.message-time {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    text-align: right;
}

/* Character Library Styles */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.character-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.character-card:hover {
    transform: translateY(-2px);
}

.character-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.character-token {
    font-family: monospace;
    background-color: #e0e7ff;
    color: #4f46e5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Chat Tab Specific Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    max-height: 80vh;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-input-container {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    resize: none;
}

.send-button {
    margin-left: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #4338ca;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 80%;
}

.user-message {
    background-color: #e0e7ff;
    color: #4f46e5;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.bot-message {
    background-color: #f3f4f6;
    color: #111827;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.message-time {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    text-align: right;
}

/* Chat History Styles */
.history-item {
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.75rem;
    border-radius: 1rem;
    background: #e0e5ec;
    box-shadow: 3px 3px 6px #b8b9be, -3px -3px 6px #ffffff;
}

.history-item:hover {
    background: rgba(79, 70, 229, 0.1);
}

.history-item.active {
    background: rgba(79, 70, 229, 0.2);
}

/* Typing Indicator */
.typing-indicator {
    color: #64748b;
    font-style: italic;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    background: #f0f4f8;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dots span {
    width: 0.5rem;
    height: 0.5rem;
    background: #64748b;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-0.25rem); }
}

/* Message Actions */
.message-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    justify-content: flex-end;
}

.message-action {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #e0e5ec;
    border: none;
    box-shadow: 3px 3px 6px #b8b9be, -3px -3px 6px #ffffff;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-icon {
    font-size: 3rem;
    color: #4f46e5;
    margin-bottom: 1.5rem;
}

.prompt-suggestion {
    background: #e0e5ec;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 3px 3px 6px #b8b9be, -3px -3px 6px #ffffff;
}

.prompt-suggestion:hover {
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.settings-content {
    width: 90%;
    max-width: 600px;
    background: #e0e5ec;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 10px 10px 20px #b8b9be, -10px -10px 20px #ffffff;
}

.modal-input {
    width: 100%;
    padding: 0.9rem;
    border-radius: 0.9rem;
    background: #e0e5ec;
    box-shadow: inset 5px 5px 10px #b8b9be, inset -5px -5px 10px #ffffff;
    border: none;
    outline: none;
    color: #1e293b;
}

/* Video Prompt Generator Styles */
.prompt-card {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    transition: all 0.2s ease;
}
.prompt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.prompt-title {
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}
.prompt-content {
    color: #334155;
    white-space: pre-wrap;
}
.video-clear-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: rgba(224, 229, 236, 0.7);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.video-clear-btn:hover {
    opacity: 1;
}
.video-text-area-container {
    position: relative;
}
.video-option-card {
    transition: all 0.2s ease;
    cursor: pointer;
}
.video-option-card:hover {
    transform: translateY(-3px);
}
.video-language-tab {
    transition: all 0.2s ease;
}
.video-language-tab.active {
    background: #4f46e5;
    color: white;
}
.video-copy-btn {
    transition: all 0.2s ease;
}
.video-copy-btn:hover {
    transform: scale(1.1);
}
.video-copy-btn.copied {
    color: #10b981;
}
.video-section-collapse {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
}
.video-collapse-btn::after {
    content: '+';
    float: right;
    transition: all 0.3s ease;
}
.video-collapse-btn.collapsed::after {
    content: '-';
}
select[multiple] {
    height: auto;
    min-height: 100px;
    padding: 8px;
}
select[multiple] option {
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 4px;
    background: #f8fafc;
}
select[multiple] option:checked {
    background: #4f46e5;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .message {
        max-width: 90%;
    }
}
