/* Post-specific styles for "Distance and Similarity in Manifold Learning" */

:root {
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-accent: rgba(255, 255, 255, 0.12);
}

.post-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.2em;
}

.post-content h2.key-insights {
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.1em;
}

.post-content ul {
    margin: 15px 0 20px 20px;
    line-height: 1.8;
}

.post-content ul.compact {
    margin: 10px 0 20px 20px;
}

/* Paper info card - subtle and elegant */
.info-box {
    margin: 30px 0;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent on left side */
.info-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
    opacity: 0.7;
}

.info-box:hover {
    background: var(--card-accent);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.info-box p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: inherit;
    position: relative;
    z-index: 1;
}

.info-box strong {
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.info-box a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
}

.info-box a:hover {
    border-bottom-color: var(--accent-color);
    opacity: 0.85;
}

.info-box br {
    margin: 12px 0;
    display: block;
    content: '';
}

.back-link {
    margin-bottom: 10px;
}

.back-link a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.back-link a:hover {
    opacity: 1;
}

.back-link-bottom {
    margin-top: 40px;
}

.back-link-bottom a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.back-link-bottom a:hover {
    opacity: 1;
}

/* Term definitions/tooltips */
.term-definition {
    margin: 16px 0 20px 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.term-definition:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: rgba(255, 255, 255, 0.35);
}

.term-definition-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.term-definition-toggle {
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    font-size: 0.8em;
    transition: transform 0.2s ease;
    opacity: 0.7;
    transform: rotate(0deg);
}

.term-definition.open .term-definition-toggle {
    transform: rotate(90deg);
}

.term-definition-content {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.5;
    color: var(--text-color);
    opacity: 0.85;
}

.term-definition.open .term-definition-content {
    display: block;
}

/* Copy button */
.copy-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copy-button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button svg {
    display: block;
}

.copy-button.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.copy-button.copied svg {
    display: none;
}

.copy-button.copied::after {
    content: "✓";
    font-size: 1.1em;
    font-weight: bold;
}

/* Interactive Manifold Demo */
.interactive-manifold-demo {
    margin: 30px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.interactive-manifold-demo h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.slider-container label {
    font-weight: 500;
    min-width: 90px;
    color: var(--text-color);
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

#crumple-value {
    font-weight: 600;
    color: var(--accent-color);
    min-width: 40px;
    text-align: right;
}

.manifold-3d-container {
    width: 100%;
    max-width: 600px;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(26, 26, 26, 0.5);
    margin: 0 auto 15px;
    overflow: hidden;
}

.manifold-3d-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-hint {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 20px 0;
    font-style: italic;
}

.distance-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.distance-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.distance-label {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-line {
    display: inline-block;
    width: 40px;
    height: 3px;
    flex-shrink: 0;
}

.euclidean-line {
    background: repeating-linear-gradient(
        to right,
        rgba(239, 68, 68, 0.8) 0px,
        rgba(239, 68, 68, 0.8) 4px,
        transparent 4px,
        transparent 8px
    );
}

.geodesic-line {
    background: #10b981;
    height: 3px;
}

.distance-value {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
}

@media (max-width: 600px) {
    .distance-display {
        grid-template-columns: 1fr;
    }
    
    .slider-container {
        flex-wrap: wrap;
    }
    
    #crumple-value {
        flex-basis: 100%;
        text-align: left;
    }
}

