* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('https://images.unsplash.com/photo-1518837695005-2083093ee35b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-weight: 400;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.app-container {
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 0 0 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-right: 16px;
}

.clock-container {
    text-align: center;
}

.clock {
    font-size: 48px;
    font-weight: 300;
    color: white;
    letter-spacing: 2px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: capitalize;
}

.calendar-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-transform: capitalize;
}

.calendar-header button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-header button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.calendar-header button:active {
    transform: scale(0.95);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-day-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    padding: 8px 0;
}

.calendar-day {
    font-size: 14px;
    color: white;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.calendar-day.empty {
    background: none;
}

.calendar-day:not(.empty):hover {
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.calendar-day.current-day {
    background: linear-gradient(90deg, #6bcf7f, #4ecdc4);
    font-weight: 600;
}

.chat-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bot-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.avatar-inner {
    font-size: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.header-info h1 {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b6b;
    animation: statusBlink 2s ease-in-out infinite;
}

.status.loading .status-dot {
    background: #ffd93d;
}

.status.ready .status-dot {
    background: #6bcf7f;
    animation: none;
}

.status.error .status-dot {
    background: #ff6b6b;
}

@keyframes statusBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-messages.centered {
    justify-content: center;
    align-items: center;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.connect-button {
    background: linear-gradient(90deg, #6bcf7f, #4ecdc4);
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.chat-messages.centered .connect-button {
    margin: auto;
}

.connect-button:hover {
    background: linear-gradient(90deg, #7fdf8f, #5eddd4);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.connect-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.loading-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    margin-bottom: 16px;
    color: white;
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6bcf7f, #4ecdc4);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.message {
    margin-bottom: 24px;
    display: flex;
    width: 100%;
    gap: 12px;
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 20px;
    line-height: 1.5;
    color: white;
    word-break: break-word;
    white-space: normal;
}

.message.user .message-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-right-radius: 8px;
}

.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-left-radius: 8px;
}

.markdown-content {
    line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 16px 0 8px;
    font-weight: 600;
    color: white;
}

.markdown-content h1 { font-size: 24px; }
.markdown-content h2 { font-size: 20px; }
.markdown-content h3 { font-size: 18px; }
.markdown-content h4 { font-size: 16px; }
.markdown-content h5 { font-size: 14px; }
.markdown-content h6 { font-size: 12px; }

.markdown-content p {
    margin: 8px 0;
}

.markdown-content strong {
    font-weight: 700;
    color: #ffffff;
}

.markdown-content em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.markdown-content ul,
.markdown-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.markdown-content li {
    margin: 8px 0;
    color: white;
}

.markdown-content ol li {
    margin-bottom: 16px;
}

.markdown-content ul li {
    list-style-type: disc;
}

.markdown-content blockquote {
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    padding-left: 12px;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

.markdown-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: #ffffff;
}

.markdown-content pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    border-bottom-left-radius: 8px;
    max-width: 70px;
    margin-bottom: 24px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: typingBounce 1.4s ease-in-out infinite both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input-container {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 12px;
    width: 100%;
    max-width: 800px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.chat-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    padding: 8px 12px;
    font-size: 16px;
    color: white !important;
    outline: none !important;
    font-family: inherit;
    resize: none;
    line-height: 1.5;
    min-height: 44px;
    max-height: 120px;
    overflow-y: auto;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.chat-input::-webkit-scrollbar {
    width: 4px;
}

.chat-input::-webkit-scrollbar-track {
    background: transparent;
}

.chat-input::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.chat-input::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.send-button {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.send-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.send-button:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.send-button svg {
    width: 24px;
    height: 24px;
    stroke: white !important;
    fill: none !important;
    transition: stroke 0.3s ease;
}

.send-button:hover:not(:disabled) svg {
    stroke: #6bcf7f !important;
}

@media (max-width: 768px) {
    .app-container {
        width: 95%;
        height: 90vh;
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-radius: 24px 24px 0 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-right: 0;
        margin-bottom: 16px;
        padding: 16px;
    }
    
    .chat-container {
        width: 100%;
        border-radius: 0 0 24px 24px;
    }
    
    .clock {
        font-size: 36px;
        padding: 12px;
    }
    
    .date {
        font-size: 12px;
    }
    
    .calendar-container {
        padding: 12px;
    }
    
    .calendar-header {
        font-size: 14px;
    }
    
    .calendar-header button {
        width: 32px;
        height: 32px;
    }
    
    .calendar-day-label {
        font-size: 10px;
    }
    
    .calendar-day {
        font-size: 12px;
        padding: 6px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-header {
        padding: 20px;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
    }
    
    .header-info h1 {
        font-size: 20px;
    }
    
    .bot-avatar {
        width: 40px;
        height: 40px;
    }
    
    .avatar-inner {
        font-size: 20px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .connect-button {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .chat-input-container {
        padding: 12px 16px;
        border-bottom-left-radius: 24px;
        border-bottom-right-radius: 24px;
    }
    
    .input-wrapper {
        padding: 8px;
        border-radius: 12px;
    }
    
    .chat-input {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .send-button {
        width: 36px;
        height: 36px;
    }
    
    .send-button svg {
        width: 20px;
        height: 20px;
    }
    
    .markdown-content h1 { font-size: 20px; }
    .markdown-content h2 { font-size: 18px; }
    .markdown-content h3 { font-size: 16px; }
    .markdown-content h4 { font-size: 14px; }
    .markdown-content h5 { font-size: 12px; }
    .markdown-content h6 { font-size: 10px; }
}