/* =========================================================
   GLOBAL RESET & BACKGROUND
   ========================================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
}

body {
    background-image: url('images/lac Saint-Jean.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: Arial, sans-serif;
    color: #ffffff;
}

/* =========================================================
   STRUCTURED CONTAINER & GRID LAYOUT
   ========================================================= */
.site-wrapper {
    max-width: 1150px;
    margin: 20px auto;
    padding: 15px;
}

.header-banner {
    text-align: center;
    padding: 20px;
    background: rgba(107, 68, 155, 0.75);
    backdrop-filter: blur(4px);
    border: 2px solid #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
}

.main-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px; /* Left Sidebar, Main Frame, Right Sidebar */
    gap: 20px;
    align-items: start;
}

/* =========================================================
   CATEGORY BOX STYLING (Neocities Directory Aesthetic)
   ========================================================= */
.category-box {
    background: rgba(107, 68, 155, 0.85); 
    backdrop-filter: blur(4px);
    border: 2px solid #ffffff;
    border-radius: 10px;
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.3);
}

.category-title {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: lowercase;
}

.category-content {
    padding: 12px;
    font-size: 12px;
    line-height: 1.4;
}

/* =========================================================
   NAVIGATION CATEGORY
   ========================================================= */
.nav-links {
    list-style: none;
    padding: 8px 12px;
    margin: 0;
}

.nav-links li {
    margin-bottom: 8px;
}

.nav-links a {
    color: #ffde85;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.mini-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* =========================================================
   THOUGHTS BOX
   ========================================================= */
.thought-box-content {
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.thought-entry {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
}

.thought-entry:last-child {
    border-bottom: none;
}

.thought-date {
    font-size: 9px;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 5px;
    border-radius: 4px;
}

.thought-entry p {
    font-size: 11px;
    margin: 4px 0 0 0;
}

/* =========================================================
   DRAWBOX CENTER WIDGET
   ========================================================= */
.drawbox-widget {
    display: flex;
    gap: 16px;
    padding: 14px;
    font-family: 'Courier New', Courier, monospace;
}

#drawboxcanvas {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 4px;
    display: block;
}

.controls-line, .buttons-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.stroke-color {
    width: 18px;
    height: 18px;
    border: 1px solid #ffffff;
    cursor: pointer;
}

.buttons-line button {
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(2, 80px);
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.image-container {
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 2px;
    text-align: center;
}

.image-container img {
    width: 100%;
    height: 65px;
    object-fit: cover;
}

/* =========================================================
   BUTTON WALL, WEBRINGS, & BUTTERFLY
   ========================================================= */
.button-wall {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.button-wall img {
    max-width: 88px;
    height: auto;
}

.webring-placeholder {
    background: rgba(0,0,0,0.25);
    padding: 8px;
    text-align: center;
    font-size: 11px;
    border: 1px dashed #fff;
    border-radius: 4px;
}

.protect {
    background-color: #ffffff;
    color: #000000;
    padding: 10px;
    border: 1px solid #000000;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    text-align: center;
    border-radius: 8px;
}

.protect h1.title {
    margin: 0;
    color: blue;
    font-size: 20px;
}

.protect img.image {
    max-width: 130px;
    border: 1px solid #000;
    margin: 6px 0;
}

.protect p.description {
    font-size: 10px;
    margin: 4px 0;
    text-align: left;
}

.site-footer {
    text-align: center;
    padding: 15px;
    font-size: 12px;
}

.text-center { text-align: center; }


/* Ensure the gallery container takes up all available right-side space */
.draw-right {
    flex: 1;
    min-width: 185px; /* Ensures enough width for both columns + vertical scrollbar */
}

/* Gallery grid adjustments */
#gallery {
    display: grid;
    /* Use dynamic equal columns instead of fixed 80px width */
    grid-template-columns: repeat(2, 1fr); 
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;     /* Keep vertical scrolling for extra drawings */
    overflow-x: hidden;   /* Strictly banish the horizontal scrollbar */
    padding-right: 4px;   /* Breathing room so images don't hug the scrollbar */
}

/* Fix cropped drawings in the gallery */
.image-container img {
    width: 100%;
    height: auto;          /* Overrides rigid pixel height */
    aspect-ratio: 1 / 1;   /* Forces the image to remain a perfect 1:1 square */
    object-fit: contain;   /* Ensures 100% of the drawing is visible without clipping */
    display: block;
}

/* =========================================================
   ABOUT ME BOX
   ========================================================= */
.profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid #ffffff;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
}

.profile-bio {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: bold;
    font-size: 14px;
    color: #ffde85;
}

.profile-tag {
    font-size: 10px;
    opacity: 0.8;
}

.about-text {
    margin: 0 0 8px 0;
    font-size: 11px;
    line-height: 1.4;
}

.retro-divider {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    margin: 8px 0;
}

.about-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 11px;
}

.about-stats li {
    margin-bottom: 4px;
}

.about-stats strong {
    color: #ffde85;
}