/* Message styles */
li {
    display: block;
}

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

.message-content code {
    padding: 2px 4px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
}

.system-message {
    background-color: rgba(255, 249, 247, 0.25) !important;
    border-color: rgb(255, 0, 0) !important;
    border-width: 2px !important;
    color: black !important;
}

.user-message {
    text-align: right;
    border-color: rgba(215, 215, 215, 0.5) !important;
    border-width: 2px !important;
}

.user-message #chat-thumbnails-container {
    justify-content: flex-end;
}

.agent-message {
    border-color: rgba(0, 0, 255, 0.25) !important;
    border-width: 2px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.message-entry {
    margin: 0px 0px 10px 0px !important;
}

#chat-messages {
    height: 45vh;
    padding: 10px 10px 10px 10px;
}

.dash-border {
    border: dashed 5px #ddd !important;
    margin-bottom: 10px;
}

/* Responsive grid classes */
@media (min-width: 100px) {
    .col-xs-12 {
        width: 100%;
    }

    .col-xs-11 {
        width: 91.6%;
    }

    .col-xs-10 {
        width: 83.3%;
    }

    .col-xs-9 {
        width: 75%;
    }

    .col-xs-8 {
        width: 66.6%;
    }

    .col-xs-7 {
        width: 58.3%;
    }

    .col-xs-6 {
        width: 50%;
    }

    .col-xs-5 {
        width: 41.6%;
    }

    .col-xs-4 {
        width: 33%;
    }

    .col-xs-3 {
        width: 25%;
    }
}

@media (min-width: 576px) {
    .col-sm-12 {
        width: 100%;
    }

    .col-sm-11 {
        width: 91.6%;
    }

    .col-sm-10 {
        width: 83.3%;
    }

    .col-sm-9 {
        width: 75%;
    }

    .col-sm-8 {
        width: 66.6%;
    }

    .col-sm-7 {
        width: 58.3%;
    }

    .col-sm-6 {
        width: 50%;
    }

    .col-sm-5 {
        width: 41.6%;
    }

    .col-sm-4 {
        width: 33%;
    }

    .col-sm-3 {
        width: 25%;
    }
}

@media (min-width: 768px) {
    .col-md-12 {
        width: 100%;
    }

    .col-md-11 {
        width: 91.6%;
    }

    .col-md-10 {
        width: 83.3%;
    }

    .col-md-9 {
        width: 75%;
    }

    .col-md-8 {
        width: 66.6%;
    }

    .col-md-7 {
        width: 58.3%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-5 {
        width: 41.6%;
    }

    .col-md-4 {
        width: 33%;
    }

    .col-md-3 {
        width: 25%;
    }
}

@media (min-width: 992px) {
    .col-lg-12 {
        width: 100%;
    }

    .col-lg-11 {
        width: 91.6%;
    }

    .col-lg-10 {
        width: 83.3%;
    }

    .col-lg-9 {
        width: 75%;
    }

    .col-lg-8 {
        width: 66.6%;
    }

    .col-lg-7 {
        width: 58.3%;
    }

    .col-lg-6 {
        width: 50%;
    }

    .col-lg-5 {
        width: 41.6%;
    }

    .col-lg-4 {
        width: 33%;
    }

    .col-lg-3 {
        width: 25%;
    }
}

@media (min-width: 1200px) {
    .col-xl-12 {
        width: 100%;
    }

    .col-xl-11 {
        width: 91.6%;
    }

    .col-xl-10 {
        width: 83.3%;
    }

    .col-xl-9 {
        width: 75%;
    }

    .col-xl-8 {
        width: 66.6%;
    }

    .col-xl-7 {
        width: 58.3%;
    }

    .col-xl-6 {
        width: 50%;
    }

    .col-xl-5 {
        width: 41.6%;
    }

    .col-xl-4 {
        width: 33%;
    }

    .col-xl-3 {
        width: 25%;
    }
}

@media (min-width: 1920px) {
    .col-3xl-6 {
        width: 50%;
    }

    .col-3xl-4 {
        width: 33%;
    }

    .col-3xl-3 {
        width: 25%;
    }
}

@media (min-width: 2560px) {
    .col-4xl-6 {
        width: 50%;
    }

    .col-4xl-4 {
        width: 33%;
    }

    .col-4xl-3 {
        width: 25%;
    }
}

@media (min-width: 3840px) {
    .col-5xl-6 {
        width: 50%;
    }

    .col-5xl-4 {
        width: 33%;
    }

    .col-5xl-3 {
        width: 25%;
    }
}

.hover-border {
    background-color: #ddffd2;
}

.fake-masonry {
    --gap: clamp(0px, 1vmin, 0px);
    columns: 100px;
    gap: var(--gap);
}

.fake-masonry img {
    padding-bottom: 1rem;
}

a[target="_blank"] {
    cursor: pointer;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-light: #e2e8f0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.hero-section {
    background: var(--dark-gradient);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4rem;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn-light {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-light:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

.section-dark {
    background: var(--dark-gradient);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.feature-icon {
    font-size: 3.5rem !important;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.tagline-section {
    background: var(--primary-gradient);
    border-radius: 20px;
    padding: 3rem 2rem;
    color: white;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.tagline-text {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cta-section {
    background: var(--secondary-gradient);
    border-radius: 20px;
    color: white;
    box-shadow: 0 15px 35px rgba(240, 147, 251, 0.3);
}

.nav-btn {
    color: var(--text-primary) !important;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.nav-btn:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea !important;
}

footer {
    backdrop-filter: blur(20px);
    margin-top: 4rem;
}

.container-custom {
    max-width: 1200px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .tagline-text {
        font-size: 1.75rem;
    }
}

.flip-container {
    perspective: 1000px;
    height: 200px;
}

.flipper {
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
}

.flip-container.flipped .flipper {
    transform: rotateY(180deg);
}

.front,
.back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.back {
    transform: rotateY(180deg);
}

.agent-card {
    transition: box-shadow 0.2s, transform 0.2s;
}

.agent-card:hover {
    box-shadow: 0 10px 24px 0 rgba(0, 0, 0, 0.10), 0 1.5px 4px 0 rgba(0, 0, 0, 0.10);
    transform: translateX(0px) translateY(-5px);
}

.agent-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.agent-image:hover {
    transform: scale(1.02);
}

/* Ensure textareas properly fit within their containers */
#edit-agent-description,
#agent-prompt {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure form containers handle overflow properly */
.w-full.min-w-0 {
    overflow: hidden;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-color: #10b981;
    --error-color: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.95);
    
    /* Light mode variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --button-bg: #f3f4f6;
    --button-hover: #e5e7eb;
}

[data-theme="dark"] {
    /* Dark mode variables */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --card-bg: #2d2d2d;
    --input-bg: #374151;
    --button-bg: #374151;
    --button-hover: #4b5563;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme-aware styles */
.theme-aware {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-card {
    background: var(--card-bg);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-input {
    background: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-button {
    background: var(--button-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-button:hover {
    background: var(--button-hover);
}

/* Dark mode specific overrides */
[data-theme="dark"] .hero-section {
    color: #8b5cf6 !important;
}

[data-theme="dark"] .tagline-text {
    color: var(--text-primary);
}

[data-theme="dark"] .feature-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .feature-title {
    color: var(--text-primary);
}

[data-theme="dark"] .feature-description {
    color: var(--text-secondary);
}

[data-theme="dark"] #message-input {
    background: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] #message-input::placeholder {
    color: var(--text-secondary);
}

[data-theme="dark"] .glass-card {
    background: rgba(45, 45, 45, 0.95);
    border-color: var(--border-color);
}

[data-theme="dark"] .marketplace-container {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .agent-section {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .file-section {
    background: var(--card-bg);
    border-color: var(--border-color);
}

/* Animation for theme toggle */
.theme-transition {
    transition: all 0.3s ease;
}

/* Theme toggle button animation */
#theme-toggle i {
    transition: transform 0.3s ease;
}

#theme-toggle:hover i {
    transform: rotate(15deg);
}

#hero-container {
    transition: transform 0.75s ease-in-out;
}
#hero-container.slide-up {
    transform: translateY(-150%);
}

#homepage-container {
    transition: transform 0.5s ease-in-out;
}
#homepage-container.slide-up {
    transform: translateY(+20px);
}

/* Custom Scrollbar Styling */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-secondary);
}

/* ASCII Table and Monospace Content Styling */
.message-content {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.9;
    tab-size: 4;
    font-weight: normal; /* Ensure normal font weight */
}

/* Ensure ASCII tables display properly */
.message-content br {
    line-height: 1.2;
}

/* Preserve spacing in ASCII content */
.message-content .ascii-table {
    white-space: pre-line;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    line-height: 1.0; /* Very tight line spacing for ASCII tables */
    font-weight: normal; /* Ensure normal font weight for ASCII tables */
}

/* Ensure line breaks in ASCII tables don't add extra spacing */
.message-content .ascii-table br {
    line-height: 1.0;
    margin: 0;
    padding: 0;
}

/* Remove any default spacing from ASCII table content */
.message-content .ascii-table * {
    line-height: 1.0;
    margin: 0;
    padding: 0;
    font-weight: normal; /* Ensure normal font weight for all ASCII table elements */
}

/* Dark mode adjustments for ASCII content */
[data-theme="dark"] .message-content .ascii-table {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Ensure proper table alignment on mobile */
@media (max-width: 768px) {
    .message-content .ascii-table {
        font-size: 0.8em;
        padding: 4px;
        overflow-x: scroll;
        line-height: 1.0; /* Consistent tight spacing on mobile */
    }
}

/* Specific scrollbar styling for different elements */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Dark mode specific scrollbar adjustments */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1f2937;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

[data-theme="dark"] ::-webkit-scrollbar-corner {
    background: #1f2937;
}

[data-theme="dark"] * {
    scrollbar-color: #4b5563 #1f2937;
}

/* File content textarea styling for ASCII tables */
#file-content {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.2;
    tab-size: 4;
}

/* When file content contains ASCII tables */
#file-content.ascii-table {
    font-size: 0.9em;
    line-height: 1.0;
    letter-spacing: 0.5px;
    white-space: pre;
    padding: 12px;
    background-color: var(--bg-secondary);
}

/* Dark mode adjustments for file content ASCII tables */
[data-theme="dark"] #file-content.ascii-table {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* AI Icon Styles */
.ai-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: aiGlow 2s ease-in-out infinite;
}

@keyframes aiGlow {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Progress Squares Container */
.progress-squares-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 40px;
}

.alien-symbols-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    align-items: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    padding: 4px;
    overflow: hidden;
}

.alien-symbol {
    font-size: 14px;
    font-weight: bold;
    color: #9333EA;
    opacity: 0;
    transform: scale(0) rotate(0deg);
    transition: all 0.3s ease;
    text-shadow: 0 0 6px rgba(147, 51, 234, 0.6);
    user-select: none;
    animation: alienGlow 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    min-height: 16px;
}

.alien-symbol.show {
    opacity: 1;
    transform: scale(1) rotate(360deg);
}

.alien-symbol.glitch {
    animation: alienGlitch 0.2s ease-in-out;
    filter: hue-rotate(90deg);
}

@keyframes alienGlow {
    0%, 100% {
        text-shadow: 0 0 6px rgba(147, 51, 234, 0.6);
        filter: brightness(1);
    }
    50% {
        text-shadow: 0 0 10px rgba(147, 51, 234, 0.9), 0 0 14px rgba(147, 51, 234, 0.6);
        filter: brightness(1.1);
    }
}

@keyframes alienGlitch {
    0%, 100% {
        transform: scale(1) rotate(360deg) translateX(0);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(360deg) translateX(-2px);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: scale(0.9) rotate(360deg) translateX(2px);
        filter: hue-rotate(180deg);
    }
    75% {
        transform: scale(1.05) rotate(360deg) translateX(-1px);
        filter: hue-rotate(270deg);
    }
}

/* Dark mode adjustments for alien symbols */
[data-theme="dark"] .alien-symbol {
    color: #A855F7;
    text-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
}

[data-theme="dark"] .alien-symbol.show {
    animation: alienGlowDark 2s ease-in-out infinite;
}

/* Image thumbnail styles */
#image-thumbnails {
    transition: all 0.3s ease;
}

.thumbnail-item {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.thumbnail-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Dark mode adjustments for image thumbnails */
[data-theme="dark"] .thumbnail-item {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .thumbnail-item .text-gray-600 {
    color: var(--text-secondary);
}

[data-theme="dark"] .thumbnail-item .bg-green-50 {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

[data-theme="dark"] .thumbnail-item .bg-red-50 {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* Timestamp info styling */
.thumbnail-item .text-blue-500 {
    font-size: 10px;
    font-style: italic;
    opacity: 0.8;
}

[data-theme="dark"] .thumbnail-item .text-blue-500 {
    color: #60a5fa;
}

/* Chat message thumbnail styles */
.message-content .inline-block {
    transition: all 0.2s ease;
}

.message-content .inline-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dark mode for chat message thumbnails */
[data-theme="dark"] .message-content .inline-block {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .message-content .inline-block .text-gray-600 {
    color: var(--text-secondary);
}

/* Agent card gradient styles */
.agent-card-gradient {
    background: linear-gradient(90deg, #1e40af 0%, #7c3aed 100%);
}

/* Different gradient variations for variety */
.agent-card:nth-child(1) .agent-card-gradient {
    background: linear-gradient(90deg, #1e40af 0%, #7c3aed 100%);
}

.agent-card:nth-child(2) .agent-card-gradient {
    background: linear-gradient(90deg, #059669 0%, #0d9488 100%);
}

.agent-card:nth-child(3) .agent-card-gradient {
    background: linear-gradient(90deg, #dc2626 0%, #ea580c 100%);
}

.agent-card:nth-child(4) .agent-card-gradient {
    background: linear-gradient(90deg, #7c2d12 0%, #c2410c 100%);
}

.agent-card:nth-child(5) .agent-card-gradient {
    background: linear-gradient(90deg, #be185d 0%, #ec4899 100%);
}

.agent-card:nth-child(6) .agent-card-gradient {
    background: linear-gradient(90deg, #4338ca 0%, #8b5cf6 100%);
}

/* Cycle through gradients for more cards */
.agent-card:nth-child(7) .agent-card-gradient {
    background: linear-gradient(90deg, #1e40af 0%, #7c3aed 100%);
}

.agent-card:nth-child(8) .agent-card-gradient {
    background: linear-gradient(90deg, #059669 0%, #0d9488 100%);
}

.agent-card:nth-child(9) .agent-card-gradient {
    background: linear-gradient(90deg, #dc2626 0%, #ea580c 100%);
}

.agent-card:nth-child(10) .agent-card-gradient {
    background: linear-gradient(90deg, #7c2d12 0%, #c2410c 100%);
}

/* Continue the pattern for more cards */
.agent-card:nth-child(11) .agent-card-gradient {
    background: linear-gradient(90deg, #be185d 0%, #ec4899 100%);
}

.agent-card:nth-child(12) .agent-card-gradient {
    background: linear-gradient(90deg, #4338ca 0%, #8b5cf6 100%);
}

@keyframes alienGlowDark {
    0%, 100% {
        text-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
        filter: brightness(1);
    }
    50% {
        text-shadow: 0 0 10px rgba(168, 85, 247, 0.9), 0 0 14px rgba(168, 85, 247, 0.6);
        filter: brightness(1.1);
    }
}

/* Chat message images cursor styling */
.message-content img {
    cursor: pointer !important;
    transition: opacity 0.2s ease;
}

.message-content img:hover {
    opacity: 0.8;
}

/* Word Definition Popup Styles */
#word-definition-popup {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
    width: 350px;
    max-width: 350px;
    min-width: 350px;
}

#word-definition-popup.hidden {
    opacity: 0;
    pointer-events: none;
}

#popup-word {
    color: #1f2937;
    margin: 0;
    font-size: 1.1rem;
}

#popup-definition {
    line-height: 1.5;
    max-height: 250px;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#close-popup {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#close-popup:hover {
    background-color: #f3f4f6;
}

/* Dark mode styles for popup */
.dark #word-definition-popup {
    background-color: #1f2937;
    border-color: #4b5563;
}

.dark #popup-word {
    color: #f9fafb;
}

.dark #popup-definition {
    color: #d1d5db;
}

.dark #close-popup:hover {
    background-color: #374151;
}

/* Action Buttons Styles */
#popup-actions-container {
    border-top: 1px solid #e5e7eb;
}

.dark #popup-actions-container {
    border-top-color: #4b5563;
}

#popup-copy-button,
#popup-google-button,
#popup-youtube-button {
    transition: all 0.2s ease;
    min-width: 40px;
}

#popup-copy-button {
    flex: 1;
}

#popup-google-button,
#popup-youtube-button {
    flex: 0 0 auto;
    width: 40px;
    padding: 8px;
}

#popup-copy-button:hover,
#popup-google-button:hover,
#popup-youtube-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark #popup-copy-button:hover,
.dark #popup-google-button:hover,
.dark #popup-youtube-button:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Icon-specific hover colors */
#popup-google-button:hover {
    color: #4285f4 !important;
}

#popup-youtube-button:hover {
    color: #ff0000 !important;
}

