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

:root {
    --bg-dark: #0A0A0B;
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --accent-violet: #8b5cf6;
    --accent-fuchsia: #d946ef;
    --accent-indigo: #6366f1;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Animated gradient background */
.gradient-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(128px);
    mix-blend-mode: normal;
    opacity: 0.03;
}

.gradient-blob-1 {
    top: 0;
    left: 25%;
    width: 384px;
    height: 384px;
    background: rgba(255, 255, 255, 0.05);
    animation: none;
}

.gradient-blob-2 {
    bottom: 0;
    right: 25%;
    width: 384px;
    height: 384px;
    background: rgba(255, 255, 255, 0.03);
    animation: none;
}

.gradient-blob-3 {
    top: 25%;
    right: 33%;
    width: 256px;
    height: 256px;
    background: rgba(255, 255, 255, 0.04);
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.15;
        transform: scale(1.1);
    }
}

/* Mouse follower gradient */
.mouse-follower {
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    filter: blur(96px);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
}

.mouse-follower.active {
    opacity: 0.015;
}

/* Main container */
.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    max-width: 56rem;
    margin: 0 auto;
}

/* Chat messages container */
.chat-messages-container {
    width: 100%;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.chat-messages-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    scroll-behavior: smooth;
}

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

.chat-messages-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-messages-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-messages-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Message styles */
.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
    align-items: flex-start;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.message-content {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.message.bot .message-content {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.message.user .message-content {
    background: white;
    color: var(--bg-dark);
}

/* Chat interface */
.chat-interface {
    width: 100%;
}

/* Header */
.chat-header {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 3rem;
    transition: all 0.4s ease;
    width: 100%;
    animation: fadeInUp 0.6s ease backwards;
}

.chat-header.compact {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.header-content {
    display: inline-block;
    position: relative;
    transition: all 0.4s ease;
}

.header-title {
    font-size: 2rem;
    font-weight: 500;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    transition: all 0.4s ease;
}

.chat-header.compact .header-title {
    font-size: 1.25rem;
}

.header-underline {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: slideInWidth 0.8s ease 0.5s backwards;
    transition: opacity 0.4s ease;
}

.chat-header.compact .header-underline {
    opacity: 0.5;
}

.header-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
    transition: all 0.4s ease;
    overflow: hidden;
    max-height: 50px;
}

.chat-header.compact .header-subtitle {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
}

/* Glass card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.chat-input-container {
    padding: 1rem;
}

.chat-input-container:focus-within {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.1), 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Typing indicator */
.typing-indicator-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.typing-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-avatar-text {
    font-size: 0.7rem;
    font-weight: 600;
}

.typing-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.typing-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

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

.typing-dots .dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.85);
    }
    30% {
        opacity: 0.9;
        transform: scale(1.1);
    }
}

/* Input wrapper */
.input-wrapper {
    position: relative;
}

#chatInput {
    width: 100%;
    min-height: 60px;
    max-height: 200px;
    padding: 1rem;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    resize: none;
    overflow-y: auto;
}

#chatInput::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

#chatInput::-webkit-scrollbar {
    width: 4px;
}

#chatInput::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Attachments */
.attachments-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1rem 0.75rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    animation: fadeIn 0.2s ease;
}

.attachment-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.attachment-remove:hover {
    color: var(--text-primary);
}

/* Input actions */
.input-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
}

.send-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.send-btn:not(:disabled):hover {
    background: white;
    color: var(--bg-dark);
    transform: scale(1.01);
}

.send-btn:not(:disabled):active {
    transform: scale(0.98);
}

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

.send-btn:not(:disabled) {
    background: white;
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Voice Input Button (next to send button) */
.voice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-right: 0.5rem;
}

.voice-btn:hover:not(.recording) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: translateY(-1px);
}

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

.voice-mic-icon {
    color: inherit;
    transition: opacity 0.3s ease;
}

.voice-btn.recording {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.voice-btn.recording .voice-mic-icon {
    display: none;
}

.voice-recording-square {
    width: 1rem;
    height: 1rem;
    border-radius: 0.125rem;
    background: #ef4444;
    animation: spin 3s linear infinite;
}

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

.voice-btn.recording .voice-recording-square {
    display: block !important;
}

/* Voice Visualizer Container (shown only when recording) */
.voice-visualizer-container {
    width: 100%;
    padding: 1rem 0 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.voice-timer {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.voice-visualizer {
    height: 1rem;
    width: 16rem;
    max-width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
}

.voice-visualizer-bar {
    width: 0.125rem;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    height: 0.25rem;
    transition: all 0.3s ease;
}

.voice-visualizer-bar.active {
    background: rgba(255, 255, 255, 0.5);
    animation: visualizerPulse 0.3s ease-in-out;
}

@keyframes visualizerPulse {
    0%, 100% {
        height: 0.25rem;
    }
    50% {
        height: var(--bar-height, 80%);
    }
}

.voice-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Suggestions Carousel */
.suggestions-wrapper {
    margin-top: 1rem;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.carousel-arrow:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.carousel-arrow:active {
    transform: scale(0.95);
}

.carousel-arrow svg {
    width: 20px;
    height: 20px;
}

.suggestions-carousel {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    cursor: grab;
    user-select: none;
    flex: 1;
}

.suggestions-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.suggestion-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
    flex-shrink: 0;
}

.suggestion-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

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

/* Upcoming Appointments Section */
.appointments-section {
    margin-top: 2rem;
    width: 100%;
}

.appointments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.appointments-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
}

.appointments-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-selector {
    position: relative;
}

.user-dropdown {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    min-width: 180px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.user-dropdown option {
    background: #1a1a1b;
    color: #ffffff;
    padding: 0.5rem;
}

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

.user-dropdown:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.1);
}

/* Refresh button */
.refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 2rem;
    height: 2rem;
}

.refresh-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--accent-violet);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
    transform: scale(1.05);
}

.refresh-btn:active {
    transform: scale(0.95);
}

.refresh-btn.refreshing svg {
    animation: spin 0.8s linear infinite;
}

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

.appointments-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.appointments-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    flex: 1;
}

.appointments-container::-webkit-scrollbar {
    display: none;
}

.appointments-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    width: 100%;
}

.appointment-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 300px;
    flex-shrink: 0;
    position: relative;
}

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

.appointment-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.appointment-id {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    color: var(--text-tertiary);
    font-family: 'Courier New', monospace;
}

.copy-icon {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.copy-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.appointment-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.appointment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
}

.appointment-actions {
    display: flex;
    gap: 0.5rem;
}

.action-icon-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.join-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--accent-violet);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.join-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    width: 100%;
}

/* Social Media Posts Section */
.social-media-section {
    margin-top: 2rem;
    width: 100%;
}

.social-media-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.social-media-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
}

.social-media-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-media-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    flex: 1;
}

.social-media-container::-webkit-scrollbar {
    display: none;
}

.social-media-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    width: 100%;
}

.social-media-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    position: relative;
}

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

.social-media-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.social-media-platform-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
}

.social-media-platform-badge.Facebook {
    background: rgba(24, 119, 242, 0.1);
    border-color: rgba(24, 119, 242, 0.3);
    color: #1877F2;
}

.social-media-platform-badge.Instagram {
    background: rgba(225, 48, 108, 0.1);
    border-color: rgba(225, 48, 108, 0.3);
    color: #E1306C;
}

.social-media-platform-badge.Linkedin {
    background: rgba(10, 102, 194, 0.1);
    border-color: rgba(10, 102, 194, 0.3);
    color: #0A66C2;
}

.social-media-platform-badge.Unknown {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.social-media-status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.social-media-status-badge.scheduled {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-violet);
}

.social-media-status-badge.draft {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #FFC107;
}

.social-media-card-media {
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.social-media-card-media img,
.social-media-card-media video {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
}

.social-media-card-content {
    flex: 1;
}

.social-media-caption {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}

.read-more-btn {
    background: transparent;
    border: none;
    color: var(--accent-violet);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-top: 0.5rem;
    transition: opacity 0.2s;
}

.read-more-btn:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.post-now-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.post-now-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

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

.post-now-btn svg {
    flex-shrink: 0;
}

.schedule-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.schedule-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

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

.schedule-btn svg {
    flex-shrink: 0;
}

.delete-post-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.375rem;
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.delete-post-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

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

.delete-post-btn svg {
    flex-shrink: 0;
}

.social-media-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-media-card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
    gap: 0.75rem;
}

.social-media-schedule {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.social-media-schedule svg {
    opacity: 0.6;
}

/* Popup for description and notes */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.popup-content {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.popup-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.popup-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.popup-close:hover {
    color: var(--text-primary);
}

.popup-body {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.popup-empty {
    color: var(--text-tertiary);
    font-style: italic;
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row strong {
    color: var(--text-primary);
    font-weight: 500;
}

.detail-row div {
    color: var(--text-secondary);
    word-break: break-word;
}

/* Markdown styling */
.markdown-body {
    line-height: 1.6;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin: 1rem 0 0.75rem 0;
    font-weight: 600;
    color: inherit;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
    margin-top: 0;
}

.markdown-body h1 {
    font-size: 1.5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.markdown-body h2 {
    font-size: 1.3em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.4rem;
}

.markdown-body h3 {
    font-size: 1.15em;
}

.markdown-body p {
    margin: 0.5rem 0;
}

.markdown-body ul,
.markdown-body ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.markdown-body li {
    margin: 0.25rem 0;
}

.markdown-body strong {
    font-weight: 600;
}

.markdown-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.markdown-body pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}

.markdown-body pre code {
    background: none;
    padding: 0;
}

.markdown-body a {
    color: var(--accent-violet);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes slideInWidth {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

.fade-in {
    animation: fadeInDown 0.5s ease;
}

.fade-in-delay {
    animation: fadeInDown 0.5s ease 0.3s backwards;
}

/* Fade out animation for hiding elements */
.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Hidden state for elements that should be removed */
.hidden {
    display: none !important;
}

/* Smooth transitions for chat layout changes */
.chat-header,
.suggestions-container {
    transition: opacity 0.4s ease, transform 0.4s ease, margin 0.4s ease;
}

/* User Selection Onboarding Popup */
.user-selection-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.user-selection-popup {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

.user-selection-header {
    text-align: center;
    margin-bottom: 2rem;
}

.user-selection-title {
    font-size: 1.75rem;
    font-weight: 600;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.user-selection-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.user-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.user-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.02);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

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

.user-card:active {
    transform: translateY(-2px);
}

.user-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.user-card:hover .user-card-icon {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-card-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.user-selection-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.user-selection-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid var(--glass-border);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.user-selection-loading-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem 1rem;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .chat-messages-scroll {
        max-height: 50vh;
    }

    .suggestions-container {
        gap: 0.375rem;
    }

    .suggestion-btn {
        font-size: 0.8125rem;
        padding: 0.375rem 0.625rem;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.25rem;
    }

    .suggestions-container {
        flex-direction: column;
    }

    .suggestion-btn {
        width: 100%;
    }
}
