:root {
    --primary: #486DF6;
    --secondary: #3451C7;
    --tertiary: #00973d;
    --background: #ffffff;
    --text: #333333;
    --muted: #666666;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tooltip-bg: rgba(72, 109, 246, 0.9);
    --tooltip-text: #ffffff;
    --modal-bg: rgba(0, 0, 0, 0.9);
    --gradient-start: #486DF6;
    --gradient-end: #00973d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.logo-container {
    position: relative;
    width: 128px;
    height: 128px;
    margin-bottom: 0.5rem;
}

.logo-pulse {
    position: absolute;
    inset: -0.375rem;
    border-radius: 9999px;
    background-color: rgba(72, 109, 246, 0.2);
    animation: pulse 2s infinite;
}

.logo-image {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.brand {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.brand-highlight {
    color: var(--tertiary);
    font-weight: 800;
}

/* Progress Bar Styles */
.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 1rem;
    height: 0.5rem;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary), var(--tertiary));
    height: 100%;
    transition: width 1s ease;
    border-radius: 1rem;
}

.progress-label {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 0.25rem;
    text-align: right;
}

/* Status List Styles */
.status-list {
    margin-top: 1.5rem;
}

.status-list h4 {
    color: var(--primary);
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.status-list h4:first-child {
    margin-top: 0;
}

.status-list ul {
    list-style-type: none;
    margin-left: 0.5rem;
}

.status-list ul li {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-list ul li:before {
    content: "•";
    color: var(--primary);
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Section Styles */
.section {
    margin-bottom: 4rem;
}

/* Section Title */
.section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius);
    margin-left: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
/* Feature Card Styles */
.feature-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--background);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    cursor: pointer;
    outline: none;
    position: relative;
}

.feature-card:hover,
.feature-card:focus {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.feature-images {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    background: #f0f4f8;
    cursor: pointer;
}

.feature-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Improved Feature Images Transition */
@keyframes crossfade {
    0%, 25% {
        opacity: 1;
        transform: scale(1);
    }
    33%, 92% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

.feature-images .feature-image {
    animation: crossfade 9s infinite;
}

.feature-images .feature-image:nth-child(2) {
    animation-delay: 3s;
}

.feature-images .feature-image:nth-child(3) {
    animation-delay: 6s;
}

.feature-images:hover .feature-image {
    animation-play-state: paused;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Demo Link Styles */
.demo-link {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.demo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: #4763F7;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(71, 99, 247, 0.2);
}

.demo-button:hover,
.demo-button:focus {
    background: #3651E3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(71, 99, 247, 0.3);
}

.demo-credentials {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(30, 32, 37, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.credential {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.75rem;
}

.value {
    background: rgba(45, 48, 55, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #A0A7B8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    background: rgba(45, 48, 55, 0.8);
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    color: #4763F7;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.copy-btn:hover {
    background: rgba(55, 58, 65, 0.8);
    color: #5D7AF8;
}


/* Architecture Diagram */
.architecture-diagram {
    background: #1a1a1a;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin: 2rem auto;
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mermaid {
    background: #ffffff;
    border-radius: calc(var(--radius) - 4px);
    padding: 2rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon,
.mermaid .node path {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.mermaid .edgePath .path {
    stroke-width: 2;
    stroke-linecap: round;
}

.mermaid .flowchart-link {
    stroke: var(--primary);
    animation: flow 30s linear infinite;
    stroke-dasharray: 10 5;
}

@keyframes flow {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}

/* Tech Stack */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    background-color: #f8f8f8;
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover,
.tech-item:focus {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.tech-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-item ul {
    list-style-type: none;
    margin-top: 0.5rem;
}

.tech-item ul li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-item ul li::before {
    content: "•";
    color: var(--primary);
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
    display: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--tooltip-bg) transparent transparent transparent;
}

/* Copy Tooltip */
.copy-tooltip {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--tooltip-bg);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1002;
}

.copy-tooltip.show {
    opacity: 1;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    z-index: 1000;
    padding: 2rem;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--secondary);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-nav:hover,
.modal-nav:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 1rem;
}

.modal-next {
    right: 1rem;
}

.modal-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 1001;
}

#backToTop:hover,
#backToTop:focus {
    background: var(--secondary);
    transform: scale(1.1);
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--background);
    color: var(--muted);
    border-top: 1px solid var(--border);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #121212;
        --text: #ffffff;
        --muted: #a0aec0;
        --border: #2d3748;
        --tooltip-bg: rgba(72, 109, 246, 0.9);
        --tooltip-text: #ffffff;
        --modal-bg: rgba(0, 0, 0, 0.95);
    }

    .mermaid {
        background: #ffffff;
        color: #000000;
    }

    .feature-images {
        background: #2d3748;
    }

    .tech-item {
        background-color: #2d3748;
    }

    .tooltip {
        background: var(--tooltip-bg);
        color: var(--tooltip-text);
    }

    .feature-card ul li::before {
        color: var(--tertiary);
    }

    .section-title {
        color: var(--primary);
    }

    .status-list ul li::before {
        color: var(--tertiary);
    }

    .progress-bar {
        background: #2d3748;
    }

    .credential .value {
        background-color: #2d3748;
    }

    .navbar ul li a {
        color: var(--text);
    }

    .navbar ul li a:hover,
    .navbar ul li a:focus {
        color: var(--primary);
    }

    .demo-button:hover,
    .demo-button:focus {
        background: var(--secondary);
    }

    .modal-image {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
     .demo-credentials {
        background: #1A1D24;
    }
    
    .credential .value {
        background: #2A2F38;
        color: #A0A7B8;
    }

    .copy-btn {
        background: #2A2F38;
    }

    .copy-btn:hover {
        background: #353B47;
    }
}

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

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

    .architecture-diagram {
        padding: 1rem;
    }

    .mermaid {
        font-size: 12px;
        padding: 1rem;
    }

    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-images {
        height: 250px;
    }

    .modal-nav {
        padding: 0.75rem;
    }

    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .demo-credentials {
        font-size: 0.85rem;
    }

    .demo-button {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .credential {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .credential .label {
        min-width: auto;
    }

    .credential .value {
        width: 100%;
        font-size: 0.875rem;
    }

    .progress-container {
        margin: 1rem 0;
    }

    .status-list {
        margin-top: 1rem;
    }

    .status-list h4 {
        margin: 0.75rem 0 0.25rem;
    }

    #backToTop {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Accessibility focus styles */
:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.feature-card:focus-within {
    box-shadow: 0 0 0 2px var(--primary);
}

/* Print styles */
@media print {
    .feature-images,
    .demo-link,
    #backToTop,
    .modal-nav,
    .modal-close {
        display: none !important;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    .feature-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }

    .architecture-diagram {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .footer {
        position: fixed;
        bottom: 0;
        width: 100%;
    }
}

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

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