/* Modern Embeddings Page Styling */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
header {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

header h1 {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.3rem;
    color: #64748b;
    font-weight: 300;
}

/* Sections */
section {
    background: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

section h2 {
    color: #667eea;
    font-size: 2.2rem;
    margin-bottom: 20px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

section h3 {
    color: #764ba2;
    font-size: 1.6rem;
    margin: 20px 0 10px;
}

section h4 {
    color: #334155;
    font-size: 1.3rem;
    margin: 15px 0 10px;
}

section p {
    margin-bottom: 15px;
    color: #475569;
    font-size: 1.05rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 40px;
}

.timeline-marker {
    position: absolute;
    left: 18px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px #667eea;
}

.era-1 { background: #ef4444; }
.era-2 { background: #f59e0b; }
.era-3 { background: #10b981; }
.era-4 { background: #8b5cf6; }

.timeline-content {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.timeline-content h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.timeline-content ul {
    margin-left: 20px;
    margin-top: 10px;
}

.timeline-content li {
    margin-bottom: 8px;
    color: #475569;
}

/* Concept Grid */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.concept-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.concept-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.concept-card h3 {
    color: #667eea;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.example-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

.example-box code {
    font-family: 'Courier New', monospace;
    color: #dc2626;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Dimension Comparison */
.dimension-explanation {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
}

.dimension-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dim-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 3px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.dim-box:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.dim-box h4 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.dim-model {
    color: #764ba2;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.dim-box ul {
    list-style: none;
    text-align: left;
    margin-top: 15px;
}

.dim-box li {
    padding: 5px 0;
    color: #475569;
}

.dim-box li::before {
    content: '✓ ';
    color: #10b981;
    font-weight: bold;
    margin-right: 5px;
}

/* Interactive Visualization */
.viz-explanation {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.interactive-container {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
}

.controls {
    text-align: center;
    margin-bottom: 20px;
}

.action-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 5px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.action-btn:active {
    transform: translateY(0);
}

.canvas-container {
    text-align: center;
    margin: 20px 0;
    overflow-x: auto;
}

#embeddingCanvas {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Legend */
.legend {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #e2e8f0;
}

.legend h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #475569;
}

.legend-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.legend-marker.male { background: #3b82f6; }
.legend-marker.female { background: #ec4899; }
.legend-marker.neutral { background: #8b5cf6; }

.legend-line {
    width: 40px;
    height: 3px;
    margin-right: 10px;
    border-radius: 2px;
}

.legend-line.gender {
    background: #ec4899;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.legend-line.status {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Math Box */
.math-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #3b82f6;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.math-box h4 {
    color: #3b82f6;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.formula-steps {
    margin-top: 20px;
}

.step {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.step-label {
    color: #3b82f6;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.step code {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 5px;
    display: block;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #dc2626;
    font-size: 1rem;
}

.step p {
    color: #64748b;
    font-style: italic;
    margin: 5px 0 0 0;
}

/* Example Grid */
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.example-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #f59e0b;
    transition: all 0.3s ease;
    cursor: pointer;
}

.example-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
}

.example-card h4 {
    color: #92400e;
    margin-bottom: 10px;
}

.example-card code {
    background: white;
    padding: 10px;
    border-radius: 5px;
    display: block;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #dc2626;
    font-size: 0.9rem;
}

.example-card p {
    color: #78350f;
    font-size: 0.95rem;
    margin: 0;
}

/* Revolution Points */
.revolution-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.point {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.point:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.point-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.point h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.point p {
    color: #475569;
    text-align: left;
}

/* Technical Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.tech-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tech-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.tech-card h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.tech-card code {
    background: white;
    padding: 10px;
    border-radius: 5px;
    display: block;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #dc2626;
    font-size: 0.9rem;
}

.tech-card ul {
    list-style: none;
    margin-top: 10px;
}

.tech-card li {
    padding: 5px 0;
    color: #475569;
}

.tech-card li::before {
    content: '→ ';
    color: #667eea;
    font-weight: bold;
}

.tech-note {
    font-style: italic;
    color: #64748b;
    font-size: 0.9rem;
}

/* Applications List */
.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.app-item {
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #3b82f6;
    transition: all 0.3s ease;
}

.app-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.3);
}

.app-item h4 {
    color: #1e40af;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.app-item p {
    color: #1e40af;
    margin: 0;
}

/* Summary Box */
.summary-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 3px solid #f59e0b;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.summary-box p {
    color: #78350f;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-top: 40px;
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    section {
        padding: 20px;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .concept-grid,
    .dimension-comparison,
    .revolution-points,
    .tech-grid,
    .app-list,
    .example-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-marker {
        left: 8px;
    }

    #embeddingCanvas {
        width: 100%;
        height: auto;
    }
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    section {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .action-btn,
    .controls {
        display: none;
    }
}
