:root {
    --primary-color: #5E4FDB;
    --primary-dark: #4A3FC7;
    --secondary-color: #FF6B6B;
    --accent-color: #4ECDC4;
    --dark-bg: #0A0E27;
    --light-bg: #F8F9FA;
    --text-dark: #1A1A2E;
    --text-light: #E9ECEF;
    --card-bg: #FFFFFF;
    --border-color: #E1E8ED;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0A0E27 0%, #1A1A2E 100%);
    color: var(--text-light);
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(94, 79, 219, 0.1) 0%, transparent 70%);
    animation: pulse 20s ease-in-out infinite;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 24px;
    animation: slideDown 0.6s ease-out;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, #B8B8FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideDown 0.8s ease-out;
}

.subtitle {
    font-size: 1.25rem;
    color: #B8B8FF;
    margin-bottom: 40px;
    animation: slideDown 1s ease-out;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: slideDown 1.2s ease-out;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(94, 79, 219, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Visualization Section */
.visualization-section {
    padding: 100px 0;
    background: white;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 60px;
    font-size: 1.125rem;
}

.viz-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.viz-panel {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.viz-panel h3 {
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.sequential-viz, .parallel-viz {
    position: relative;
    padding: 30px;
}

.timeline-container {
    margin-bottom: 30px;
}

.processor-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.timeline {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tx-block {
    background: var(--gradient-1);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    opacity: 0;
    width: 80px;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tx-block.processing {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(94, 79, 219, 0.4);
}

.tx-block.completed {
    opacity: 0.6;
    transform: scale(1);
}

.cores-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.core-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.core-row .processor-label {
    width: 60px;
    margin: 0;
}

.core-timeline {
    display: flex;
    gap: 8px;
    flex: 1;
}

.progress-bar {
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    transition: width 0.3s ease;
}

.time-display {
    text-align: center;
    font-size: 1.25rem;
    margin-top: 20px;
}

.time-label {
    color: #666;
    margin-right: 10px;
}

.time-value {
    font-weight: 700;
    color: var(--primary-color);
}

/* Different colors for different transactions */
.tx-block:nth-child(1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.tx-block:nth-child(2) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.tx-block:nth-child(3) { background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%); }
.tx-block:nth-child(4) { background: linear-gradient(135deg, #FA709A 0%, #FEE140 100%); }
.tx-block:nth-child(5) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.tx-block:nth-child(6) { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.tx-block:nth-child(7) { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.tx-block:nth-child(8) { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%); }

.time-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.btn-animate {
    display: block;
    margin: 0 auto;
    background: var(--accent-color);
    color: white;
}

.btn-animate:hover {
    background: #3FBDB4;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(78, 205, 196, 0.3);
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--light-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Technical Section */
.technical-section {
    padding: 100px 0;
    background: white;
}

.tech-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

.tech-explanation h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.tech-explanation ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.tech-explanation li {
    margin-bottom: 8px;
    color: #666;
}

.code-example {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 30px;
    overflow-x: auto;
}

.code-example h4 {
    color: var(--text-light);
    margin-bottom: 20px;
}

pre {
    margin: 0;
}

code {
    font-family: 'JetBrains Mono', monospace;
    color: #B8B8FF;
    font-size: 14px;
    line-height: 1.6;
}

/* Tech Stats */
.tech-stats {
    margin-top: 60px;
}

.tech-stats h3 {
    font-size: 1.75rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Resources Section */
.resources-section {
    padding: 100px 0;
    background: var(--light-bg);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.resource-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.resource-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.resource-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.resource-card p {
    color: #666;
}

/* Authors Section */
.authors-section {
    padding: 80px 0;
    background: white;
}

.authors-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.author {
    text-align: center;
}

.author-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.author a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.author a:hover {
    text-decoration: underline;
}

/* Blog Section */
.blog-section {
    padding: 100px 0;
    background: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.blog-author {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-date {
    color: #999;
}

.blog-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.blog-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 24px;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.blog-link:hover {
    transform: translateX(5px);
}

/* Clients Section */
.clients-section {
    padding: 100px 0;
    background: var(--light-bg);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.client-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.client-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.client-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.client-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
}

.progress-bar {
    background: #F0F0F0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    background: var(--gradient-1);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.client-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.github-link {
    color: #666;
    transition: all 0.3s ease;
}

.github-link:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 8px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Morphing Visualization Styles */
.morph-viz-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
    overflow: visible;
}

.morph-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
}

.title-static {
    flex-shrink: 0;
}

.time-period {
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.5s ease;
    display: inline-block;
    width: 120px;
    text-align: left;
}

.morph-chart {
    position: relative;
    margin-bottom: 30px;
}

.chart-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
}

.y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 0;
}

.y-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-align: right;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chart-area {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
    width: 100%;
    min-width: 700px;
    overflow: visible;
}

.x-axis {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.x-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.x-axis-title {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.morph-tx {
    position: absolute;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    border-radius: 8px;
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 1;
}

.morph-tx[data-tx="1"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: 35px;
}

.morph-tx[data-tx="2"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 95px;
}

.morph-tx[data-tx="3"] {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    top: 155px;
}

.morph-tx[data-tx="4"] {
    background: linear-gradient(135deg, #FA709A 0%, #FEE140 100%);
    top: 215px;
}

/* Sequential state (default) */
.morph-tx[data-start="0"] { left: 20px; width: 150px; }
.morph-tx[data-start="1"] { left: 190px; width: 150px; }
.morph-tx[data-start="2"] { left: 360px; width: 150px; }
.morph-tx[data-start="3"] { left: 530px; width: 150px; }

/* Parallel state */
.morph-chart.parallel .morph-tx {
    width: 150px !important;
    left: 20px !important;
}

.morph-tx:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}


/* Responsive Design */
@media (max-width: 768px) {
    .morph-viz-container {
        padding: 20px;
    }
    
    .morph-title {
        font-size: 20px;
        gap: 6px;
    }
    
    .time-period {
        width: 90px;
    }
    
    .chart-grid {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }
    
    .chart-area {
        min-width: auto;
        overflow-x: auto;
    }
    
    .morph-tx {
        font-size: 12px;
        height: 35px;
    }
    
    .morph-tx[data-tx="1"] { top: 32px; }
    .morph-tx[data-tx="2"] { top: 85px; }
    .morph-tx[data-tx="3"] { top: 138px; }
    .morph-tx[data-tx="4"] { top: 191px; }
    
    .morph-tx[data-start="0"] { left: 10px; width: 80px; }
    .morph-tx[data-start="1"] { left: 100px; width: 80px; }
    .morph-tx[data-start="2"] { left: 190px; width: 80px; }
    .morph-tx[data-start="3"] { left: 280px; width: 80px; }
    
    .morph-chart.parallel .morph-tx {
        width: 80px !important;
        left: 10px !important;
    }
    
    .x-axis {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .timeline {
        justify-content: center;
    }
    
    .cores-container .processor-label {
        font-size: 12px;
        width: 50px;
    }
    
    .tx-block {
        width: 70px;
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .viz-container {
        grid-template-columns: 1fr;
    }
    
    .tech-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .features-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .authors-list {
        flex-direction: column;
        gap: 20px;
    }
}