/* lecture-styles.css - Shared styles for all lectures */

html, body {
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    scroll-behavior: auto;
}

/* Split-pane layout */
.split-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
}

/* Add the bottom-hidden class by default */
.split-container.bottom-hidden .bottom-pane {
    display: none;
}

.split-container.bottom-hidden .divider {
    display: none;
}

.split-container.bottom-hidden .top-pane {
    height: 100% !important;
}

/* Top pane with scrollable content */
.top-pane {
    display: flex;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* Bottom pane with fixed Lean frame */
.bottom-pane {
    width: 100%;
    height: 40vh;
    position: relative;
    background-color: #1e1e1e;
}

/* Resizable divider */
.divider {
    width: 100%;
    height: 10px;
    background-color: #ddd;
    cursor: ns-resize;
    position: relative;
}

.divider:hover {
    background-color: #bbb;
}

.divider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 30px;
    height: 2px;
    background-color: #888;
    transform: translateX(-50%);
}

/* Navigation */
nav {
    width: 280px;
    background-color: #f8f9fa;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    flex-shrink: 0;
    border-right: 1px solid #dee2e6;
}

nav h2 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 1.3em;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav li {
    margin-bottom: 8px;
}

nav a {
    text-decoration: none;
    color: #3498db;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

nav a:hover {
    background-color: #e3f2fd;
}

/* Main content area */
.content-scroll {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    padding: 0 30px;
    scroll-behavior: auto;
}

main {
    max-width: 900px;
    padding: 20px 0;
}

h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

h2 {
    color: #34495e;
    margin-top: 30px;
}

h3 {
    color: #34495e;
}

/* Styled boxes for different content types */
.historical-note {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.historical-note h3 {
    color: white;
    margin-top: 0;
}

.definition {
    background-color: #e8f5e8;
    border-left: 4px solid #28a745;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.definition h4 {
    margin-top: 0;
    color: #155724;
}

.postulate {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.postulate h4 {
    margin-top: 0;
    color: #856404;
}

.theorem-proof {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.homework {
    background-color: #f1f3f4;
    border-left: 4px solid #6c757d;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.homework h4 {
    margin-top: 0;
    color: #495057;
}

/* Critical gap highlighting */
.critical-gap {
    background-color: #ffe6e6;
    border-left: 4px solid #dc3545;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.critical-gap h4 {
    margin-top: 0;
    color: #721c24;
}

/* Special styling for hyperbolic geometry */
.hyperbolic-insight {
    background-color: #f0f8ff;
    border-left: 4px solid #4169e1;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.hyperbolic-insight h4 {
    margin-top: 0;
    color: #1e3a8a;
}

/* Lean code styling */
.lean-code {
    background-color: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    overflow-x: auto;
}

.lean-text {
    background-color: #1e1e1e;
    color: #d4d4d4;        
}

.keyword {
    background-color: #1e1e1e;
    color: #569cd6;
}

.type {
    background-color: #1e1e1e;
    color: #4ec9b0;
}

.comment {
    background-color: #1e1e1e;
    color: #6a9955;
    font-style: italic;
}

.function {
    background-color: #1e1e1e;
    color: #dcdcaa;
}

/* Image container */
.image-container {
    margin: 25px 0;
    text-align: center;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-container h4 {
    margin-top: 0;
    color: #2c3e50;
}

/* Two-column proof styling */
.two-column-proof {
    border: 2px solid #2c3e50;
    margin: 20px 0;
    background-color: white;
    font-family: 'Times New Roman', serif;
}

.proof-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #2c3e50;
    color: white;
}

.statements-header, .reasons-header {
    padding: 12px 15px;
    font-weight: bold;
    text-align: center;
    font-size: 1.1em;
}

.reasons-header {
    border-left: 2px solid white;
}

.proof-step {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #dee2e6;
}

.proof-step:last-child {
    border-bottom: none;
}

.proof-step.conclusion {
    background-color: #f8f9fa;
    font-weight: bold;
}

.proof-step.contradiction {
    background-color: #ffe6e6;
    font-weight: bold;
    color: #721c24;
}

.statement, .reason {
    padding: 10px 15px;
    border-right: 1px solid #dee2e6;
}

.reason {
    border-right: none;
    border-left: 1px solid #dee2e6;
    font-style: italic;
}

.proof-step:nth-child(even) {
    background-color: #f8f9fa;
}

/* Chess board styling */
.chess-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.chess-board {
    width: 320px;
    height: 320px;
    border: 3px solid #2c3e50;
    display: grid;
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
}

.chess-square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: all 0.3s ease;
    /* ADD THESE LINES: */
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    box-sizing: border-box;
}

.chess-square.light {
    background-color: #f0d9b5;
}

.chess-square.dark {
    background-color: #b58863;
}

.chess-notation {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 18px;
    line-height: 1.8;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    min-width: 200px;
}

.current-move {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Lean interface mockup */
.lean-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.lean-code-panel {
    background-color: #1e1e1e;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #3e3e3e;
}

.lean-goal-panel {
    background-color: #2d2d30;
    padding: 20px;
    overflow-y: auto;
}

.lean-goal-header {
    color: #569cd6;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid #3e3e3e;
    padding-bottom: 5px;
}

.lean-goal-content {
    color: #d4d4d4;
    line-height: 1.6;
}

/* Interactive elements */
.interactive-button {
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 10px 5px;
}

.interactive-button:hover {
    background-color: #2980b9;
}

.interactive-button.secondary {
    background-color: #6c757d;
}

.interactive-button.secondary:hover {
    background-color: #5a6268;
}

/* Back to home link */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Arrow animation styles */
.curvy-arrow {
    position: absolute;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.curvy-arrow.show {
    opacity: 1;
    transform: scale(1);
}

.arrow-path {
    fill: none;
    stroke: #dc3545;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawArrow 1s ease-out forwards;
}

.arrow-head {
    fill: #dc3545;
    opacity: 0;
    animation: showArrowHead 0.3s ease-out 0.8s forwards;
}

@keyframes drawArrow {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes showArrowHead {
    to {
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .top-pane {
        flex-direction: column;
    }
    
    nav {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .content-scroll {
        padding: 0 15px;
    }
    
    .chess-container {
        flex-direction: column;
        gap: 20px;
    }
    
.chess-board {
    width: 320px;
    height: 320px;
}

}

.split-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
}

/* Add the bottom-hidden class by default */
.split-container.bottom-hidden .bottom-pane {
    display: none;
}

.split-container.bottom-hidden .divider {
    display: none;
}

.split-container.bottom-hidden .top-pane {
    height: 100% !important;
}

/* Top pane with scrollable content */
.top-pane {
    display: flex;
    overflow: hidden;
    flex: 1;
    min-height: 0; /* Important for proper flexbox behavior */
}

/* Bottom pane with fixed Lean frame */
.bottom-pane {
    width: 100%;
    height: 40vh; /* Initial height - will be adjusted by dragging */
    position: relative;
}

/* Resizable divider */
.divider {
    width: 100%;
    height: 10px;
    background-color: #ddd;
    cursor: ns-resize;
    position: relative;
}

.divider:hover {
    background-color: #bbb;
}

/* Divider handle for better visibility */
.divider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 30px;
    height: 2px;
    background-color: #888;
    transform: translateX(-50%);
}


/* Divider handle for better visibility */
.divider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 30px;
    height: 2px;
    background-color: #888;
    transform: translateX(-50%);
}


/* Math styling */
.theorem {
    background-color: #f9f9f9;
    border-left: 3px solid #0066cc;
    padding: 10px 15px;
    margin: 20px 0;
}

.definition {
    background-color: #f9f9f9;
    border-left: 3px solid #009900;
    padding: 10px 15px;
    margin: 20px 0;
}

.example {
    background-color: #f9f9f9;
    border-left: 3px solid #cc6600;
    padding: 10px 15px;
    margin: 20px 0;
}

.code-editor {
    border: 1px solid #ddd;
    margin: 20px 0;
}

.run-button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    margin-top: 5px;
}

.output {
    background-color: #f5f5f5;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    min-height: 30px;
}

/* Lean frame */
.lean-frame {
    width: 100%;
    height: 100%;
    border: none;
}