.chess-board {
    display: grid;
    /* Force exactly 8 columns AND 8 rows of equal size */
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);

    /* Responsive sizing */
    width: 100%;
    max-width: 400px;
    /* Cap the size so it doesn't get huge */

    /* Magic property: This forces the container itself to always be a perfect square */
    aspect-ratio: 1 / 1;

    border: 5px solid #333;
    user-select: none;
    margin: 0 auto;
    /* Center the board */
    box-sizing: border-box;
}

.square {
    width: 100%;
    height: 100%;

    /* Center the piece perfectly */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Font adjustments */
    font-size: clamp(1.5rem, 9vw, 3rem);
    min-width: 0;
    overflow: hidden;

    /* Slightly smaller to ensure it fits */
    line-height: 1;
    /* Prevents font vertical spacing from pushing grid */
    cursor: pointer;

    color: transparent !important;
    text-shadow: 0 0 0 black;
    font-family: "Segoe UI Symbol", "DejaVu Sans", sans-serif;
}

/* Colors */
.light {
    background-color: #f0d9b5;
    color: black;
}

.dark {
    background-color: #b58863;
    color: black;
}

.selected {
    background-color: #7b61ff !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

nav {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

nav a {
    margin-right: 15px;
    text-decoration: none;
    color: #0070f3;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

.card {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    background: #f9f9f9;
}

button {
    background: #0070f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #0051a2;
}

input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


blockquote {
    max-width: 50%;
    margin: 30px auto;

    font-style: italic;
    color: #555;

}

/* This rule only applies if the screen is narrower than 768px (Phones & Tablets) */
@media (max-width: 768px) {
    blockquote {
        max-width: 80%;
    }
}

/* Specific style for the source/author text */
blockquote .source {
    display: block;
    /* Forces it to its own line */
    margin-top: 10px;
    text-align: right;
    /* Aligns to the right */

    font-style: normal;
    /* Removes italics for contrast */
    font-size: 0.9rem;
    /* Slightly smaller text */
    color: #888;
}

/* --- Modern Controls Styling --- */

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.settings-row,
.actions-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Custom Select Dropdown */
.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper select {
    appearance: none;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 30px 6px 12px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.select-wrapper select:hover {
    border-color: #0070f3;
}

/* Custom arrow for select */
.select-wrapper::after {
    content: "▼";
    font-size: 0.6rem;
    color: #888;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Toggle Switches */
.toggle-control {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    font-size: 0.9rem;
    user-select: none;
}

.toggle-control input {
    display: none;
    /* Hide default checkbox */
}

.toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-control input:checked+.toggle-slider {
    background-color: #0070f3;
}

.toggle-control input:checked+.toggle-slider:before {
    transform: translateX(16px);
}

/* Typography for labels */
.label-text {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary {
    background: #0070f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 112, 243, 0.2);
    display: flex;
    align-items: center;
}

.btn-primary:hover {
    background: #0051a2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 112, 243, 0.3);
}

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

/* Stats Pills (Timer & Evals) */
.stats-container {
    display: flex;
    gap: 8px;
}

.stat-pill {
    background: #f0f0f0;
    color: #444;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    border: 1px solid #e0e0e0;
    min-width: 60px;
    text-align: center;
}

/* Mobile Adjustment */
@media (max-width: 600px) {
    .controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions-row {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }
}


/* --- Special Styling for Names --- */
.person-name {
    font-weight: 600;
}

/* --- Math Formula Styling --- */
.math-formula {
    font-family: "Times New Roman", Times, serif;
    font-size: 1.3rem;
    /* Slightly larger than normal text */
    text-align: center;
    background-color: #f8f9fa;
    /* Light grey background for contrast */
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
    border: 1px solid #e0e0e0;

    /* Math styling nuances */
    font-style: italic;
    color: #333;
    overflow-x: auto;
    /* Allows scrolling on small mobile screens if needed */
    white-space: nowrap;
    /* Keeps the formula on one line if possible */
}

/* Optional: Make the numbers and symbols non-italic for "proper" notation, 
   though usually not strictly necessary for a blog */
.math-formula span {
    font-style: normal;
}


/* --- Accordion Code Block (Card Style) --- */
.code-accordion {
    /* Match the .card class exactly */
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    /* Matches .card radius */
    margin: 20px 0;
    overflow: hidden;
}

.accordion-header {
    background-color: transparent;
    /* Blends with the container */
    color: #333;
    padding: 10px 20px;
    /* Slightly tighter padding */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    /* Subtle text size */
    font-weight: 600;
    border-bottom: 1px solid transparent;
    /* Hidden by default */
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: rgba(0, 0, 0, 0.03);
    /* Very subtle hover effect */
}

/* When open, add a separator line between header and code */
.accordion-header.active {
    border-bottom: 1px solid #ddd;
    background-color: white;
}

.accordion-icon {
    font-size: 1rem;
    color: #888;
    /* Greyed out icon so it's not distracting */
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
}

.accordion-content.open {
    display: block;
}

/* Code area styling */
.accordion-content pre {
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background-color: #f9f9f9 !important;
    /* White bg for code to contrast slightly with the grey card */

    /* Font adjustments */
    font-size: 0.8rem !important;
    /* Much smaller font as requested */
    line-height: 1.5;
    padding: 20px !important;
}


/* Add this to style.css */
.blog-img {
    /* CHANGED: Limit the image to 500px (or whatever size you prefer) */
    max-width: 500px;

    max-width: 300px;

    /* ADDED: Ensures it fills the space on small mobile screens */
    width: 100%;

    height: auto;
    /* Maintains aspect ratio */
    display: block;
    /* Removes bottom whitespace */
    margin: 20px auto;
    /* Centers the image with some vertical spacing */
    border-radius: 8px;
    /* Optional: matches your card border-radius */
}

/* Optional: Style the caption if you use Option B */
figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}


/* Special style for technical quotes from the paper */
blockquote.paper-excerpt {
    max-width: 100%;
    /* Override the default 50% width so the list fits */
    font-style: normal;
    /* Keep text upright (not italic) for readability */
    color: #333;
    /* Darker text for readability */
    background-color: #f1f5f9;
    /* Subtle blue-grey background */
    border-left: 5px solid #0070f3;
    /* The blue "Quote" bar */
    padding: 20px 25px;
    /* Inner spacing */
    margin: 30px 0;
    /* Outer spacing */
    border-radius: 0 8px 8px 0;
    /* Rounded corners on the right */
}

/* Clean up the list inside the quote */
.paper-excerpt .program-list {
    list-style-type: none;
    /* Remove default bullets */
    padding-left: 0;
    margin: 15px 0;
}

.paper-excerpt .program-list li {
    margin-bottom: 8px;
    padding-left: 10px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
    /* Adds a little breathing room after scrolling */
}

.internal-code-link {
    color: #0070f3;
    text-decoration: none;
    border-bottom: 1px dashed #0070f3;
    /* Distinctive style for internal jumps */
    cursor: pointer;
}

.internal-code-link:hover {
    background-color: rgba(0, 112, 243, 0.1);
}


/* GitHub Card Style */
.github-card {
    display: flex;
    align-items: center;
    background-color: #24292e;
    /* GitHub Dark BG */
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    margin: 20px 0;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 100%;
    /* Or set a fixed width like 500px */
}

.github-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.github-icon {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.github-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.repo-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.file-name {
    font-size: 0.8rem;
    color: #aaa;
    font-family: monospace;
    margin-top: 2px;
}

.github-arrow {
    font-weight: bold;
    color: #aaa;
    margin-left: 10px;
    transition: transform 0.2s;
}

.github-card:hover .github-arrow {
    transform: translateX(3px);
    color: white;
}/* Add this to docs/assets/css/style.css */
#go-board canvas {
    max-width: 100%;
    height: auto;
    touch-action: none; /* Prevent scrolling when touching the board to play */
}
