/* Base styles */
:root {
    --primary-color: #5264AE;
    --secondary-color: #4B81D6;
    --accent-color: #6B4BED;
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --gray-light: #E9ECEF;
    --gray: #CED4DA;
    --gray-dark: #6C757D;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --animation-speed: 0.3s;
    --border-radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-light);
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo .primary {
    color: var(--primary-color);
}

.logo .secondary {
    color: var(--secondary-color);
}

.tagline {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-top: -5px;
}

/* Navigation */
nav {
    width: 100%;
}

.nav-tabs {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-tabs li {
    padding: 10px 20px;
    cursor: pointer;
    position: relative;
    color: var(--gray-dark);
    border-radius: 30px;
    transition: all var(--animation-speed) ease;
    font-weight: 500;
}

.nav-tabs li:hover {
    background-color: rgba(82, 100, 174, 0.05);
    color: var(--primary-color);
}

.nav-tabs li.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-tabs li i {
    margin-right: 5px;
}

/* Main content */
main {
    flex: 1;
    padding: 40px 0;
}

/* Search section */
.search-section {
    margin-bottom: 40px;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-light);
    transition: all var(--animation-speed) ease;
}

.search-box:focus-within {
    box-shadow: var(--shadow-lg), 0 0 0 2px rgba(82, 100, 174, 0.2);
    transform: translateY(-2px);
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: background-color var(--animation-speed) ease;
}

.search-box button:hover {
    background-color: var(--secondary-color);
}

.search-hints {
    margin-top: 15px;
    text-align: center;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.hint {
    color: var(--primary-color);
    margin: 0 5px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 15px;
    background-color: rgba(82, 100, 174, 0.1);
    display: inline-block;
    transition: all var(--animation-speed) ease;
}

.hint:hover {
    background-color: rgba(82, 100, 174, 0.2);
}

/* Loader */
.loader-container {
    text-align: center;
    padding: 50px 0;
    transition: opacity var(--animation-speed) ease;
}

.loader {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.agent-icon {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.agent-message {
    background-color: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
}

.agent-role {
    font-weight: 600;
    color: var(--primary-color);
}

.pulse-circle {
    position: absolute;
    top: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(82, 100, 174, 0.3);
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Results */
.results-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--animation-speed) ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.results-header h2 {
    font-weight: 600;
    color: var(--dark-color);
}

.search-metadata {
    display: flex;
    gap: 15px;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.search-metadata i {
    margin-right: 5px;
}

#results-content {
    padding: 20px;
}

#results-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Movie results styling */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.movie-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--animation-speed) ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-dark);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.movie-description {
    font-size: 0.9rem;
    color: var(--dark-color);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Music results styling */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.music-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--animation-speed) ease;
}

.music-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.album-art {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.music-info {
    padding: 15px;
}

.song-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.artist-name {
    color: var(--gray-dark);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.music-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.play-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--animation-speed) ease;
}

.play-button:hover {
    background-color: var(--secondary-color);
}

/* News results styling */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all var(--animation-speed) ease;
}

@media (min-width: 768px) {
    .news-card {
        flex-direction: row;
    }
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.news-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

@media (min-width: 768px) {
    .news-image {
        width: 200px;
        height: 100%;
        aspect-ratio: auto;
    }
}

.news-info {
    padding: 15px;
    flex: 1;
}

.news-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-dark);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.news-summary {
    font-size: 0.9rem;
    color: var(--dark-color);
}

/* General search results styling */
.general-result {
    margin-bottom: 30px;
}

.general-result:last-child {
    margin-bottom: 0;
}

.general-result h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.result-source {
    color: var(--gray-dark);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.result-content {
    font-size: 0.95rem;
}

/* Footer */
footer {
    padding: 30px 0;
    border-top: 1px solid var(--gray-light);
}

.agent-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.agent-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.agent-badge i {
    color: var(--primary-color);
}

.footer-info {
    text-align: center;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 350px;
    max-width: calc(100% - 40px);
    display: flex;
    overflow: hidden;
    animation: slideIn 0.5s forwards;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.notification-icon {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.notification.error .notification-icon {
    background-color: var(--danger-color);
    color: white;
}

.notification-content {
    flex: 1;
    padding: 15px;
}

.notification-content h3 {
    margin-bottom: 5px;
}

.notification-close {
    background: none;
    border: none;
    padding: 15px;
    cursor: pointer;
    color: var(--gray-dark);
    transition: color var(--animation-speed) ease;
}

.notification-close:hover {
    color: var(--dark-color);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    header {
        flex-direction: row;
    }

    .logo-container {
        margin-bottom: 0;
    }
}

/* Animation for the app */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-container>* {
    animation: fadeInUp 0.5s forwards;
}

.app-container>*:nth-child(1) {
    animation-delay: 0.1s;
}

.app-container>*:nth-child(2) {
    animation-delay: 0.2s;
}

.app-container>*:nth-child(3) {
    animation-delay: 0.3s;
}

/* Markdown content styling */
#results-content h1,
#results-content h2,
#results-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

#results-content h1:first-child,
#results-content h2:first-child,
#results-content h3:first-child {
    margin-top: 0;
}

#results-content p {
    margin-bottom: 1em;
}

#results-content ul,
#results-content ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

#results-content a {
    color: var(--primary-color);
    text-decoration: none;
}

#results-content a:hover {
    text-decoration: underline;
}

#results-content code {
    background-color: var(--gray-light);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

#results-content blockquote {
    border-left: 4px solid var(--gray);
    padding-left: 15px;
    color: var(--gray-dark);
    font-style: italic;
    margin: 1em 0;
}

/* Enhanced Dark Mode Styles with Interactivity */

:root {
    --primary-color: #DD88CF;
    --secondary-color: #AD49E1;
    --accent-color: #f0f;
    --background-color: #EBD3F8;
    --card-bg: #1e1e1e;
    --text-color: #F5F5F5;
    --subtext-color: #AD49E1;
    --border-color: #2a2a2a;
    --highlight-color: #1D1616;
    --success-color: #00e676;
    --danger-color: #ff1744;
    --transition-speed: 0.4s;
    --border-radius: 12px;
    --shadow: 0 4px 20px #7A1CAC;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed) ease;
}

header,
footer,
.search-box,
.results-container,
.agent-badge,
.notification {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all var(--transition-speed) ease;
}

.nav-tabs li {
    background-color: transparent;
    color: var(--subtext-color);
    border: 1px solid transparent;
    border-radius: 30px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.nav-tabs li:hover,
.nav-tabs li.active {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.search-box input {
    background-color: var(--highlight-color);
    color: var(--text-color);
    border: none;
    padding: 15px;
    flex: 1;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

.search-box button {
    background-color: var(--primary-color);
    color: #000;
    padding: 15px 25px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.search-box button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.hint {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    transition: all var(--transition-speed) ease;
}

.hint:hover {
    background-color: var(--primary-color);
    color: #000;
    transform: scale(1.1);
}

.movie-card,
.music-card,
.news-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.movie-card:hover,
.music-card:hover,
.news-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 6px 30px rgba(0, 255, 255, 0.1);
}

a {
    color: var(--accent-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.agent-icon {
    background-color: var(--primary-color);
    color: #000;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.pulse-circle {
    background-color: rgba(0, 238, 255, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.results-container {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification {
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

input::placeholder {
    color: var(--subtext-color);
}

footer .footer-info,
.search-metadata,
.agent-badge span {
    color: var(--subtext-color);
}

/* General Layout Enhancements */
.app-container>* {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}