/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Conversation History Sidebar */
.conversation-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.conversation-sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.sidebar-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

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

.new-chat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.new-chat-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
}

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

.conversation-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    text-align: center;
    color: #666;
}

.conversation-placeholder svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.conversation-placeholder p {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.conversation-placeholder span {
    font-size: 14px;
    opacity: 0.7;
}

.conversation-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.conversation-item.active {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.conversation-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.conversation-date {
    opacity: 0.7;
}

.conversation-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.sidebar-open {
    margin-left: 320px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
}

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

.sidebar-toggle {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

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

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    position: relative;
    animation: titleGlow 4s ease-in-out infinite;
}

.logo-title::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 168, 168, 0.08));
    border-radius: 12px;
    opacity: 0;
    animation: titleHalo 4s ease-in-out infinite;
    z-index: -1;
    filter: blur(8px);
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2) saturate(1.1);
    }
}

@keyframes titleHalo {
    0%, 100% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.logo-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: #22c55e;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Chat Main */
.chat-main {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    width: 100%;
    max-width: 1200px;
    padding: 20px 32px 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    z-index: 90;
}

.chat-main.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
    max-height: calc(100vh - 200px);
    bottom: 120px;
}

.chat-main.expanded {
    width: 95%;
    max-width: 1200px;
    max-height: calc(100vh - 140px);
    bottom: 70px;
}

/* Chat Messages Container */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 15px 20px 0;
    margin-bottom: 20px;
    scroll-behavior: smooth;
    min-height: 200px;
    max-height: calc(100vh - 300px);
}

.chat-messages::-webkit-scrollbar {
    width: 12px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.9), rgba(255, 87, 87, 0.8));
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 107, 107, 1), rgba(255, 87, 87, 1));
    border-color: rgba(255, 255, 255, 0.2);
}

.chat-messages::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, rgba(255, 87, 87, 1), rgba(255, 67, 67, 1));
}

/* Floating Content Section */
.floating-content {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    transform: translateY(0) scale(1);
    padding: 20px 32px 120px;
}

.floating-content.hidden {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    pointer-events: none;
}

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



/* Messages */
.message {
    display: flex;
    margin-bottom: 16px;
}

.message.user {
    justify-content: flex-end;
}

.message.ai {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 24px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    margin-right: 20px;
}

.message.user .message-content {
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 8px;
}

.message.ai .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px 20px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: typing 1.4s ease-in-out infinite;
}

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

@keyframes typing {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Input Area - Always Visible */
.input-area {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    padding: 20px 32px 32px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    opacity: 1;
    pointer-events: all;
}

/* Floating Chat Toggle Button */
.chat-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(255, 168, 168, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(255, 107, 107, 0.4);
}

.chat-toggle svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.chat-toggle.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.8));
    transform: rotate(45deg);
}

.chat-toggle.active svg {
    transform: rotate(-45deg);
}

/* Info Cards Toggle Button */
.cards-toggle {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(59, 130, 246, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.cards-toggle.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.cards-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(34, 197, 94, 0.4);
}

.cards-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
    transition: all 0.3s ease;
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 16px 20px;
    backdrop-filter: blur(10px);
}

.input-container textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 107, 0.6) transparent;
}

.input-container textarea::-webkit-scrollbar {
    width: 6px;
}

.input-container textarea::-webkit-scrollbar-track {
    background: transparent;
}

.input-container textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 107, 0.6);
    border-radius: 3px;
}

.input-container textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 107, 0.8);
}

.input-container textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-button.active {
    background: #2563eb;
    color: white;
}

.send-button:hover:not(:disabled) {
    background: #2563eb;
    color: white;
    transform: scale(1.05);
}

/* Floating Content Section */
.floating-content {
    position: relative;
    padding: 20px 32px 120px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.95));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

/* Scroll Hint */
.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s ease;
    max-width: fit-content;
}

.scroll-hint svg {
    color: rgba(255, 107, 107, 0.8);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Content Carousel */
.content-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 24px 0;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
    mask: linear-gradient(to right, 
        transparent 0px, 
        black 20px, 
        black calc(100% - 20px), 
        transparent 100%);
    -webkit-mask: linear-gradient(to right, 
        transparent 0px, 
        black 20px, 
        black calc(100% - 20px), 
        transparent 100%);
}

.content-carousel::-webkit-scrollbar {
    height: 0;
    background: transparent;
    display: none;
}

/* Enhanced Gradient Fade Effects */
.content-carousel::before,
.content-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.content-carousel::before {
    left: 0;
    background: linear-gradient(to right, #000000 0%, rgba(0,0,0,0.8) 50%, transparent 100%);
    opacity: 0;
}

.content-carousel::after {
    right: 0;
    background: linear-gradient(to left, #000000 0%, rgba(0,0,0,0.8) 50%, transparent 100%);
    opacity: 1;
}

/* Arrow Controls */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
}

.scroll-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 107, 107, 0.6);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.scroll-arrow.left {
    left: 10px;
}

.scroll-arrow.right {
    right: 10px;
}

.scroll-arrow svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.scroll-arrow:hover svg {
    color: rgba(255, 107, 107, 0.9);
}

/* Dynamic fade states */
.content-carousel.scrolled-left::before {
    opacity: 1;
}

.content-carousel.scrolled-right::after {
    opacity: 0;
}

/* Content Cards - Fixed consistent sizing for all categories */
.content-card {
    flex: 0 0 auto;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 320px;
    min-height: 320px;
    max-height: 320px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    scroll-snap-align: start;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: cardSlideIn 0.8s ease-out forwards;
    display: flex;
    flex-direction: column;
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.06), rgba(255, 168, 168, 0.03));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.content-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.content-card:active {
    transform: translateY(-3px) scale(1.01);
    transition: all 0.2s ease;
}

/* Card Headers and Content */
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.card-header svg {
    color: rgba(255, 107, 107, 0.85);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.content-card:hover .card-header svg {
    transform: scale(1.1);
}

.card-category {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.card-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-content {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Desktop Specific Optimizations */
@media (min-width: 768px) {
    .content-carousel {
        gap: 12px;
        padding: 20px 0;
        mask: none;
        -webkit-mask: none;
    }
    
    .content-carousel::before {
        width: 60px;
        opacity: 1;
    }
    
    .content-carousel::after {
        width: 60px;
    }
    
    .floating-content:hover .scroll-arrow {
        opacity: 1;
        visibility: visible;
    }
    
    .content-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        padding: 16px;
        border-radius: 16px;
        transform: translateY(20px) scale(0.98);
    }
    
    .card-header {
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .card-category {
        font-size: 12px;
        letter-spacing: 0.7px;
    }
    
    .card-time {
        font-size: 10px;
        padding: 3px 6px;
        border-radius: 6px;
    }
    
    .card-content {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .content-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .header {
        padding: 16px 20px;
    }
    
    .logo-container {
        gap: 12px;
    }
    
    .logo-circle {
        width: 40px;
        height: 40px;
    }
    
    .logo-title {
        font-size: 24px;
    }
    
    .logo-subtitle {
        font-size: 12px;
    }
    
    .chat-main {
        padding: 16px 20px 0;
    }
    
    .input-area {
        padding: 16px 20px 24px;
    }
    
    .input-container {
        padding: 12px 16px;
    }
    
    .input-container textarea {
        font-size: 16px;
    }
    
    .floating-content {
        padding: 16px 20px 100px;
    }
    
    .content-carousel {
        gap: 20px;
        padding: 20px 0;
        mask: none;
        -webkit-mask: none;
    }
    
    .content-carousel::before,
    .content-carousel::after {
        display: none;
    }
    
    .scroll-arrow {
        display: none;
    }
    
    .content-card {
        width: 280px;
        padding: 22px;
        border-radius: 20px;
    }
    
    .card-header {
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }
    
    .card-category {
        font-size: 14px;
        letter-spacing: 0.9px;
    }
    
    .card-time {
        font-size: 12px;
        padding: 5px 10px;
        border-radius: 10px;
    }
    
    .card-content {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .logo-title::after {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        filter: blur(6px);
    }
    
    .chat-toggle {
        bottom: 120px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .chat-toggle svg {
        width: 24px;
        height: 24px;
    }
    
    .floating-content.hidden {
        transform: translateY(10px);
    }
    
    .cards-toggle {
        bottom: 120px;
        left: 20px;
        width: 48px;
        height: 48px;
    }
    
    .cards-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .chat-main.visible {
        max-height: calc(100vh - 160px);
    }
    
    .chat-messages {
        padding: 15px 0;
    }
    
    .chat-main.expanded {
        width: 98%;
        max-width: none;
        max-height: calc(100vh - 120px);
        bottom: 60px;
    }
    
    .chat-messages {
        max-height: calc(100vh - 250px);
        padding: 15px 10px 15px 0;
    }
    
    .chat-messages::-webkit-scrollbar {
        width: 8px;
    }
    
    .chat-messages::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
        margin: 5px 0;
    }
    
    .chat-messages::-webkit-scrollbar-thumb {
        background: rgba(255, 107, 107, 0.8);
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* YouTube Video Card Styling */
.youtube-card {
    border-left: 3px solid #ff0000;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05), rgba(255, 0, 0, 0.02));
}

.youtube-card:hover {
    border-color: #ff0000;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.2), 0 0 40px rgba(255, 0, 0, 0.1);
}

.youtube-card-content {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}

.youtube-thumbnail {
    position: relative;
    width: 120px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-card:hover .youtube-thumbnail img {
    transform: scale(1.05);
}

.youtube-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.youtube-card:hover .youtube-play-icon {
    background: rgba(255, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.youtube-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.channel-name {
    color: #ff0000;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.youtube-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 500;
}

.news-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.youtube-watch-btn {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.youtube-watch-btn:hover {
    background: linear-gradient(135deg, #cc0000, #aa0000);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.news-discuss-btn {
    background: linear-gradient(135deg, #0088ff, #0066cc);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 136, 255, 0.3);
}

.news-discuss-btn:hover {
    background: linear-gradient(135deg, #0066cc, #0044aa);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 255, 0.4);
}

/* Mobile YouTube Card Adjustments */
@media (max-width: 768px) {
    .youtube-card-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .youtube-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .news-card-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .youtube-watch-btn,
    .news-discuss-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 16px;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        text-align: center;
    }
    
    .logo-circle {
        width: 36px;
        height: 36px;
    }
    
    .logo-title {
        font-size: 20px;
    }
    
    .logo-subtitle {
        font-size: 11px;
    }
    
    .status-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .chat-main {
        padding: 12px 16px 0;
    }
    
    .input-area {
        padding: 16px 16px 20px;
    }
    
    .input-container {
        padding: 12px 16px;
    }
    
    .chat-toggle {
        bottom: 140px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
    
    .cards-toggle {
        bottom: 140px;
        left: 16px;
        width: 44px;
        height: 44px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .input-area {
        padding: 12px 16px 20px;
    }
    
    .input-container {
        padding: 10px 14px;
    }
    
    .send-button {
        width: 32px;
        height: 32px;
    }
    
    .floating-content {
        padding: 12px 16px 90px;
    }
    
    .scroll-hint {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .content-carousel {
        gap: 16px;
        padding: 16px 0;
    }
    
    .content-card {
        width: 260px;
        padding: 20px;
    }
    
    .card-content {
        font-size: 14px;
    }
    
    .logo-title::after {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
        filter: blur(4px);
    }
}

/* Android-specific mobile improvements */
@media screen and (max-width: 480px) {
    .chat-toggle {
        bottom: 110px !important;
        right: 16px !important;
        width: 50px !important;
        height: 50px !important;
        z-index: 1000;
    }
    
    .cards-toggle {
        bottom: 110px !important;
        left: 16px !important;
        width: 46px !important;
        height: 46px !important;
        z-index: 1000;
    }
    
    .input-area {
        padding: 12px 16px 16px !important;
        z-index: 999;
    }
    
    /* Handle keyboard open state */
    @media (max-height: 500px) {
        .chat-toggle,
        .cards-toggle {
            bottom: 20px !important;
            opacity: 0.7;
        }
    }
}

/* Extra small screens (Android phones in portrait) */
@media screen and (max-width: 360px) {
    .chat-toggle {
        bottom: 100px !important;
        right: 12px !important;
        width: 48px !important;
        height: 48px !important;
    }
    
    .cards-toggle {
        bottom: 100px !important;
        left: 12px !important;
        width: 44px !important;
        height: 44px !important;
    }
    
    .input-area {
        padding: 10px 12px 14px !important;
    }
}

/* Mobile Responsive Styles for Sidebar */
@media (max-width: 768px) {
    .conversation-sidebar {
        width: 280px;
        max-width: 85vw;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
        z-index: 1001;
    }
    
    .app-container.sidebar-open {
        margin-left: 0; /* No margin on mobile - sidebar overlays */
    }
    
    .app-container.sidebar-open .main-content {
        margin-left: 0; /* Ensure content stays in place */
        filter: blur(2px); /* Slight blur to indicate inactive state */
        transition: filter 0.25s ease;
    }
    
    .sidebar-toggle {
        display: flex; /* Always show on mobile */
        z-index: 1002; /* Above sidebar */
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .logo-title {
        font-size: 24px;
    }
    
    .logo-subtitle {
        font-size: 12px;
    }
    
    .new-chat-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .conversation-item {
        padding: 10px 14px;
    }
    
    .conversation-title {
        font-size: 13px;
    }
    
    .conversation-meta {
        font-size: 11px;
    }
}

@media (min-width: 769px) {
    .sidebar-overlay {
        display: none; /* Hide overlay on desktop */
    }
    
    .conversation-sidebar.desktop-open {
        transform: translateX(0);
        position: fixed;
    }
    
    .app-container.desktop-sidebar-open {
        margin-left: 320px;
    }
}

/* Hide sidebar toggle on desktop when sidebar is permanently open */
@media (min-width: 1024px) {
    .sidebar-toggle {
        display: flex; /* Show toggle on desktop too */
        z-index: 1002;
    }
    
    .conversation-sidebar {
        transform: translateX(0);
        position: fixed;
        z-index: 999; /* Below overlay but above content */
    }
    
    .app-container {
        margin-left: 320px;
        transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .app-container.sidebar-open {
        margin-left: 320px;
    }
    
    .app-container:not(.sidebar-open) {
        margin-left: 0;
    }
    
    .conversation-sidebar:not(.active) {
        transform: translateX(-100%);
    }
}

/* News Panel Modal Styles */
.news-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.news-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.news-panel {
    background: #000;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-panel.visible {
    transform: scale(1) translateY(0);
}

.news-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-panel-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.news-panel-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.news-panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.news-panel-content {
    padding: 24px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* News Loading State */
.news-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* News Card Panel */
.news-card-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.news-card-panel:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 107, 0.3);
    transform: translateY(-2px);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.news-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.news-card-impact {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-impact.pozitif {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.news-card-impact.enpòtan {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.news-card-impact.enteresan {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.news-card-impact.enspiran {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.news-card-summary {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 16px;
}

.news-card-time {
    font-weight: 500;
}

.news-card-category {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.news-card-action {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-card-chat-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.news-card-chat-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
}

/* News Error State */
.news-error {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.news-error p {
    margin-bottom: 16px;
    font-size: 16px;
}

.retry-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #c82333;
}

/* Mobile Responsiveness for News Panel */
@media (max-width: 768px) {
    .news-panel {
        margin: 10px;
        max-height: 95vh;
    }
    
    .news-panel-header {
        padding: 16px;
    }
    
    .news-panel-title {
        font-size: 20px;
    }
    
    .news-panel-content {
        padding: 16px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .news-card-panel {
        padding: 16px;
    }
}

/* Inline News Cards in Chat Window - Match Chat Message Styling */
.news-message {
    margin: 15px 0;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    animation: messageSlideIn 0.4s ease-out 0.1s forwards;
}

.news-message .message-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-top: 2px;
}

.news-message .avatar-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.8), rgba(255, 168, 168, 0.6));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.news-content {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    padding: 16px 20px !important;
    max-width: 85% !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.news-intro {
    margin-bottom: 16px;
    padding: 8px 0;
    background: none;
    border-radius: 0;
    border-left: none;
}

.news-category-badge {
    display: inline-block;
    background: rgba(255, 107, 107, 0.8);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-right: 8px;
}

.news-intro p {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    display: inline;
}

.news-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0 4px 0;
}

.news-card-chat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-card-chat:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 107, 0.3);
    transform: translateY(-1px);
}

.news-card-header-chat {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.news-card-title-chat {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-impact-chat {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-impact-chat.pozitif {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.news-card-impact-chat.enpòtan {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.news-card-impact-chat.enteresan {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.news-card-impact-chat.enspiran {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.news-card-summary-chat {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta-chat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-card-time-chat {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.news-card-discuss-btn {
    background: rgba(255, 107, 107, 0.8);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.news-card-discuss-btn:hover {
    background: rgba(255, 107, 107, 1);
    transform: translateY(-1px);
}

.news-card-discuss-btn svg {
    width: 12px;
    height: 12px;
}

/* Loading spinner for inline news */
.news-loading-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 14px;
}

.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid rgba(255, 107, 107, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile responsive for inline news cards */
@media (max-width: 768px) {
    .news-message {
        gap: 8px;
    }
    
    .news-message .message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .news-message .avatar-circle {
        width: 28px;
        height: 28px;
    }
    
    .news-content {
        max-width: 95% !important;
        padding: 12px 16px !important;
    }
    
    .news-cards-container {
        gap: 10px;
    }
    
    .news-card-chat {
        padding: 12px;
    }
    
    .news-card-title-chat {
        font-size: 14px;
    }
    
    .news-card-summary-chat {
        font-size: 12px;
    }
    
    .news-intro {
        padding: 6px 0;
    }
    
    .news-category-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* Horizontal News Categories in Chat */
.news-categories-message {
    margin: 15px 0;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    animation: messageSlideIn 0.4s ease-out 0.1s forwards;
}

.categories-content {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    padding: 16px 20px !important;
    max-width: 85% !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.categories-intro {
    margin-bottom: 12px;
}

.categories-intro p {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.categories-scroll-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.categories-scroll {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-card {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--category-color);
    transform: translateY(-2px);
}

.category-card:hover .category-icon {
    color: var(--category-color);
}

.category-icon {
    transition: all 0.2s ease;
    color: #ccc;
}

.category-name {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

/* Mobile responsive for categories */
@media (max-width: 768px) {
    .categories-content {
        max-width: 95% !important;
        padding: 12px 16px !important;
    }
    
    .category-card {
        min-width: 100px;
        padding: 10px 12px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .news-card-chat {
        padding: 12px;
    }
    
    .news-card-title-chat {
        font-size: 15px;
    }
    
    .news-card-summary-chat {
        font-size: 13px;
    }
    
    .news-card-discuss-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* Enhanced YouTube Video Card Styles */
.youtube-video-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.youtube-video-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 0, 0, 0.3);
    transform: translateY(-1px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.youtube-video-card:hover .video-play-overlay {
    background: rgba(255, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-content {
    padding: 0;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.video-summary {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.video-channel {
    color: #ff0000;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.video-source {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 500;
    font-style: italic;
}

.video-impact {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-impact.pozitif {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.video-impact.enpòtan {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.video-impact.enteresan {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.video-impact.enspiran {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.video-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.gade-video-btn {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.gade-video-btn:hover {
    background: linear-gradient(135deg, #cc0000, #aa0000);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.diskite-btn {
    background: linear-gradient(135deg, #0088ff, #0066cc);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 136, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.diskite-btn:hover {
    background: linear-gradient(135deg, #0066cc, #0044aa);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 255, 0.4);
}

.regular-news-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.regular-news-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 107, 0.3);
    transform: translateY(-1px);
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.news-summary {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.news-category {
    background: rgba(255, 107, 107, 0.8);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-impact {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-impact.pozitif {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.news-impact.enpòtan {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.news-impact.enteresan {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.news-impact.enspiran {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

/* Mobile YouTube Card Adjustments */
@media (max-width: 768px) {
    .video-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .gade-video-btn,
    .diskite-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
    
    .video-thumbnail {
        height: 160px;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .video-thumbnail {
        height: 140px;
    }
    
    .video-title {
        font-size: 15px;
    }
    
    .video-summary {
        font-size: 13px;
    }
    
    .gade-video-btn,
    .diskite-btn {
        padding: 12px;
        font-size: 13px;
    }
}

/* NOUVÈL Real-time Update Animations */
.category-card.has-new-content {
    border: 2px solid #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    }
}

.category-card.has-new-content .category-name {
    color: #ff6b6b !important;
    font-weight: 600;
    animation: bounce-text 1s ease-in-out infinite;
}

@keyframes bounce-text {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Auto-refresh status indicator */
.auto-refresh-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.auto-refresh-indicator.active {
    opacity: 1;
    transform: translateY(0);
}

.auto-refresh-indicator.updating {
    background: rgba(255, 193, 7, 0.9);
    animation: pulse 1s ease-in-out infinite;
}

/* Force refresh button */
.force-refresh-btn {
    position: fixed;
    bottom: 180px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.force-refresh-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff4444);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.force-refresh-btn:active {
    animation: spin 0.5s ease-in-out;
}

@media (max-width: 768px) {
    .force-refresh-btn {
        bottom: 160px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .auto-refresh-indicator {
        top: 16px;
        right: 16px;
        padding: 6px 12px;
        font-size: 11px;
    }
}
/* Slide up animation for upgrade notifications */
@keyframes slideUp {
    0% { 
        transform: translateX(-50%) translateY(10px);
        opacity: 0;
    }
    100% { 
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Live upgrading animation for NOUVÈL card */
.live-upgrading {
    animation: liveUpgrade 2s ease-in-out infinite;
}

@keyframes liveUpgrade {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }
    50% { 
        transform: scale(1.03);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }
}

/* Enhanced category card for NOUVÈL upgrades */
.category-card.has-new-content {
    transition: all 0.3s ease-in-out;
    border: 2px solid #ff6b6b !important;
    background: linear-gradient(135deg, 
        rgba(255, 107, 107, 0.1) 0%, 
        rgba(255, 107, 107, 0.05) 50%, 
        rgba(255, 255, 255, 0.95) 100%) !important;
}

/* Flash animation for upgrade effect */
@keyframes flash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Upgrade now animation */
.upgrading-now {
    animation: upgradeNow 1s ease-in-out;
}

@keyframes upgradeNow {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }
    25% { 
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(255, 107, 107, 0.6);
    }
    50% { 
        transform: scale(1.08);
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
    }
    75% { 
        transform: scale(1.03);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }
}

/* Upgrade flash animation */
@keyframes upgradeFlash {
    0% { 
        opacity: 0;
        transform: scale(0.95);
    }
    50% { 
        opacity: 1;
        transform: scale(1.02);
    }
    100% { 
        opacity: 0;
        transform: scale(1);
    }
}

/* Upgrade pulse animation */
@keyframes upgradePulse {
    0% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.05);
        filter: brightness(1.1);
    }
    100% { 
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Pulsing animation for active elements */
@keyframes pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}
