/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Montserrat:wght@400;500;600&display=swap');

/* BASIC RESET & THEME */
:root {
    --primary-green: #556b2f;
    --dark-green: #2e4034;
    --background-dark: #1a2a26;
    --text-light: #f2f2f2;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.15);
    --module-bg: rgba(255, 255, 255, 0.05);
    --module-bg-hover: rgba(255, 255, 255, 0.1);
    --completed-yellow: #ffc107;
    --mahogany-brown: #5D2A0C;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-light);
    margin: 0;
    padding-top: 80px; /* Space for fixed header */
}

/* VIDEO BACKGROUND & OVERLAY */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-color: #000;
}
.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.video-background video.visible {
    opacity: 1;
}
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 42, 38, 0.9), rgba(26, 42, 38, 0.7));
    z-index: -1;
}

/* MAIN LAYOUT */
.page-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* PAGE HEADER */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 3rem;
    margin: 0;
    color: var(--mahogany-brown);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
.page-header .subtitle {
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
    font-weight: 500;
    color: var(--mahogany-brown);
}
.rules-btn {
    background-color: var(--module-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}
.rules-btn:hover {
    background-color: var(--module-bg-hover);
}

/* TWO-COLUMN LAYOUT */
.discovery-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}
.filter-panel {
    flex: 1;
    max-width: 300px;
    position: sticky;
    top: 100px;
}
.pin-grid-area {
    flex: 3;
}

/* FILTER MODULES */
.filter-group {
    background-color: var(--module-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.filter-group h3 { 
    margin-top: 0; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 0.5rem; 
    font-size: 1.1rem; 
    color: var(--text-light);
}
.filter-group input[type="text"] { 
    width: 100%; 
    box-sizing: border-box; 
    padding: 8px; 
    background-color: rgba(0,0,0,0.2); 
    border: 1px solid #444; 
    color: #fff; 
    border-radius: 4px; 
}
.filter-group .checkbox-list div, .filter-group .radio-list div { 
    margin-bottom: 0.5rem; 
    display: flex;
    align-items: center;
}
.filter-group label {
    cursor: pointer;
}

/* --- THIS IS THE FIX: Updated grid for the new square cards --- */
.pin-grid {
    display: grid;
    /* This creates a responsive grid of squares */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

/* --- THIS IS THE FIX: New styles for the pin card --- */
.pin-card {
    background-color: var(--module-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px; /* More rounded corners */
    text-decoration: none;
    color: var(--text-light); /* Bright text color for visibility */
    display: flex;
    flex-direction: column; /* Stack image and text vertically */
    align-items: center; /* Center content horizontally */
    justify-content: center; /* Center content vertically */
    padding: 1rem;
    aspect-ratio: 1 / 1; /* Make the card a perfect square */
    transition: transform 0.2s, background-color 0.2s;
    overflow: hidden;
}
.pin-card:hover {
    transform: translateY(-5px);
    background-color: var(--module-bg-hover);
}

/* --- THIS IS THE FIX: New styles for the pin icon/artwork --- */
.pin-icon {
    width: 80px; /* Set a consistent size for the artwork */
    height: 80px;
    margin-bottom: 1rem; /* Space between image and text */
}
.pin-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure artwork is not distorted */
}

/* --- THIS IS THE FIX: New styles for the pin name/info --- */
.pin-info {
    padding: 0;
    border-left: none; /* Remove the old border */
    text-align: center; /* Center the pin name */
}
.pin-info h4 { 
    font-family: 'Merriweather', serif; 
    font-size: 1rem; /* Slightly larger font for readability */
    margin: 0; 
    color: var(--text-light); /* Explicitly set bright color */
}

/* --- THIS IS THE FIX: Obsolete progress styles are removed --- */
/* .pin-info p, .pin-progress-bar, .progress-fill, .progress-text, .completed-badge have been removed */


/* PAGINATION CONTROLS (Unchanged) */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 5px;
}
.page-btn {
    background-color: var(--module-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn:hover {
    background-color: var(--module-bg-hover);
    color: var(--text-light);
}
.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page-info {
    color: var(--text-muted);
    margin: 0 10px;
}

/* --- THIS IS THE FIX: Simplified media queries for the new grid --- */
@media (max-width: 768px) {
    .discovery-layout {
        flex-direction: column;
    }
    .filter-panel {
        position: static;
        max-width: 100%;
    }
}