:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-glow: rgba(99, 102, 241, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
}

/* Hero styling */
.hero-section {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #ffffff;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.badge-soft {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    display: inline-block;
}

/* Feature Cards */
.feature-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    transition: all 0.25s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: #eef2ff;
    color: #4f46e5;
}

/* Floating Chat Widget */
.chat-widget-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    cursor: pointer;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-widget-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.5);
}

.chat-widget-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
    border: 1px solid #e2e8f0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.chat-widget-window.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-bubble {
    max-width: 82%;
    padding: 0.65rem 0.9rem;
    border-radius: 0.9rem;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-bubble.assistant {
    background: #ffffff;
    color: #1e293b;
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 0.2rem;
}

.chat-bubble.assistant p:last-child {
    margin-bottom: 0;
}

.chat-bubble.assistant ul, 
.chat-bubble.assistant ol {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.chat-bubble.assistant li {
    margin-bottom: 0.25rem;
}

.chat-bubble.assistant code {
    background: #f1f5f9;
    color: #d946ef;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}

.chat-bubble.assistant pre {
    background: #1e293b;
    color: #f8fafc;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    font-size: 0.82em;
}

.chat-bubble.assistant pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.chat-bubble.assistant blockquote {
    border-left: 3px solid #6366f1;
    padding-left: 0.6rem;
    margin: 0.4rem 0;
    color: #64748b;
}

.chat-bubble.assistant table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    margin: 0.5rem 0;
}

.chat-bubble.assistant th,
.chat-bubble.assistant td {
    border: 1px solid #e2e8f0;
    padding: 0.3rem 0.5rem;
}

.chat-bubble.assistant th {
    background: #f8fafc;
}

.chat-bubble.user {
    background: #4f46e5;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 0.2rem;
}

.chat-bubble.system-note {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.8rem;
    font-style: italic;
    align-self: center;
    text-align: center;
}

.chat-input-area {
    padding: 0.75rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.unread-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}
