:root {
    /* SPH Brand Colors */
    --sph-primary-1: #C896FA;
    --sph-primary-2: #0FDF75;
    --sph-primary-3: #FFD200;
    --sph-secondary-1: #64DCE1;
    --sph-secondary-2: #FF8C46;
    --sph-secondary-dark: #242424;

    --primary-gradient: linear-gradient(135deg, #242424 0%, #34284f 50%, #C896FA 100%);
    --sph-hero-gradient: linear-gradient(135deg, #1f1b2e 0%, #2b1f47 40%, #703aa8 80%, #C896FA 100%);
    --accent-glow: rgba(200, 150, 250, 0.35);

    --bs-primary: #8b3fd9;
    --bs-primary-rgb: 139, 63, 217;
}

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

/* Custom Overrides & SPH Utilities */
.text-primary,
.navbar-brand.text-primary {
    color: #7b2cbf !important;
}

.btn-primary {
    background-color: #8b3fd9;
    border-color: #8b3fd9;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #7425c7;
    border-color: #7425c7;
    color: #ffffff;
}

.btn-outline-primary {
    color: #8b3fd9;
    border-color: #8b3fd9;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #8b3fd9;
    border-color: #8b3fd9;
    color: #ffffff;
}

.bg-primary {
    background-color: #8b3fd9 !important;
}

.border-primary {
    border-color: #8b3fd9 !important;
}

/* Hero styling */
.hero-section {
    background: var(--sph-hero-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(200, 150, 250, 0.2);
    border: 1px solid rgba(200, 150, 250, 0.4);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    display: inline-block;
}

.badge-soft .highlight-tag {
    color: var(--sph-primary-3);
    font-weight: 700;
}

/* Timeline & Demo Step Cards */
.demo-card {
    border: 1px solid #ede9f6;
    border-radius: 1.25rem;
    transition: all 0.25s ease;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.demo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(36, 36, 36, 0.09);
    border-color: #C896FA;
}

.demo-card.active-demo {
    border: 2px solid #8b3fd9;
    box-shadow: 0 12px 28px rgba(139, 63, 217, 0.15);
}

.demo-badge-step {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tech-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: #f1edfa;
    color: #7b2cbf;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

.tech-tag.tag-green {
    background: rgba(15, 223, 117, 0.15);
    color: #0c9e54;
}

.tech-tag.tag-yellow {
    background: rgba(255, 210, 0, 0.2);
    color: #946f00;
}

.tech-tag.tag-cyan {
    background: rgba(100, 220, 225, 0.25);
    color: #0d8b91;
}

.tech-tag.tag-orange {
    background: rgba(255, 140, 70, 0.2);
    color: #c9510e;
}

/* About / Hybrid Maker Section */
.maker-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(36, 36, 36, 0.08);
}
.feature-card {
    border: 1px solid #ede9f6;
    border-radius: 1rem;
    transition: all 0.25s ease;
    height: 100%;
    background: #ffffff;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(36, 36, 36, 0.08);
    border-color: #C896FA;
}

.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: rgba(200, 150, 250, 0.18);
    color: #7b2cbf;
}

.icon-circle.icon-green {
    background: rgba(15, 223, 117, 0.15);
    color: #0c9e54;
}

.icon-circle.icon-yellow {
    background: rgba(255, 210, 0, 0.2);
    color: #b58900;
}

.icon-circle.icon-cyan {
    background: rgba(100, 220, 225, 0.2);
    color: #0d8b91;
}

.icon-circle.icon-orange {
    background: rgba(255, 140, 70, 0.2);
    color: #d45912;
}

/* Floating Chat Widget */
.chat-widget-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b3fd9 0%, #C896FA 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(139, 63, 217, 0.45);
    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(139, 63, 217, 0.6);
}

.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(36, 36, 36, 0.18);
    border: 1px solid #ede9f6;
    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: linear-gradient(135deg, #242424 0%, #462870 60%, #8b3fd9 100%);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #C896FA;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #fbf9fd;
    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: #242424;
    align-self: flex-start;
    border: 1px solid #e9e4f3;
    border-bottom-left-radius: 0.2rem;
    box-shadow: 0 2px 6px rgba(36, 36, 36, 0.04);
}

.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: #f3edfc;
    color: #8b3fd9;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}

.chat-bubble.assistant pre {
    background: #242424;
    color: #f8fafc;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    font-size: 0.82em;
    border-left: 3px solid #C896FA;
}

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

.chat-bubble.assistant blockquote {
    border-left: 3px solid #C896FA;
    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: #8b3fd9;
    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 #ede9f6;
}

.chat-input-area .btn-primary {
    background-color: #8b3fd9;
    border-color: #8b3fd9;
}

.unread-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #0FDF75;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(15, 223, 117, 0.8);
}

.accent-sph-cyan {
    color: #0d8b91;
}

.accent-sph-orange {
    color: #d45912;
}

.accent-sph-green {
    color: #0c9e54;
}

.accent-sph-yellow {
    color: #b58900;
}

.badge-sph-primary {
    background-color: #8b3fd9;
    color: #ffffff;
}

.badge-sph-secondary {
    background-color: #64DCE1;
    color: #242424;
}
