@font-face {
    font-family: 'Quicksand';
    src: url('quicksand.woff2') format('woff2');
    font-weight: 300 700;
    font-display: swap;
}
body {
    padding: 0px;
    background-color: transparent;
    font-family: 'Quicksand', sans-serif;
    font-size: 12px;
}
h1 {
    text-align: center;
    color: #023E7C;
    font-weight: 500;
    font-size: 32px;
    letter-spacing: 0.5px;
}
strong {
    color: #023E7C;
}
#page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0px 0px;
}
#main-layout {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 20px;
}
#puzzle-wrapper {
    width: 100%;
    max-width: 1600px;
    margin-right: auto;
    position: relative;
}
#puzzle-background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 10px;
    background-image: url('gradient.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
}
#puzzle {
    position: relative;
    z-index: 1;
}
#solution-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px auto;
    gap: 6px;
    max-width: 90vw;
}
.solution-box {
    width: clamp(40px, 5vw, 40px);
    height: clamp(40px, 5vw, 40px);
    position: relative;
    border: 1px solid #333;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
.solution-label {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 16px;
    color: #003399;
    font-weight: 600;
}

#clue-sidebar {
    width: 600px;
    padding: 20px;
    background: #f7f9fc;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(2, 62, 124, 0.08);
    max-height: 80vh;
    overflow-y: auto;
    position: sticky;
    top: 100px;
    margin-left: 0;
    scrollbar-width: thin;
    scrollbar-color: #c5d8ef #f7f9fc;
}
#clue-sidebar::-webkit-scrollbar {
    width: 4px;
}
#clue-sidebar::-webkit-scrollbar-track {
    background: #f7f9fc;
}
#clue-sidebar::-webkit-scrollbar-thumb {
    background-color: #c5d8ef;
    border-radius: 4px;
}
#clue-sidebar h3,
#clue-sidebar h4 {
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 10px;
    font-weight: 700;
    color: #023E7C;
    opacity: 0.5;
    margin: 16px 0 6px;
}
.clue-item {
    cursor: pointer;
    padding: 6px 8px 6px 11px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
    line-height: 1.4;
}
.clue-item:hover {
    background-color: #e8f1fb;
    border-left-color: #a5c8f0;
}
.clue-item.active {
    background-color: #deeaf9;
    border-left-color: #023E7C;
}
.clue-item .clue-number {
    font-weight: 700;
    font-size: 13px;
    color: #023E7C;
    margin-right: 4px;
}

@media (max-width: 768px) {
    #main-layout {
        flex-direction: column;
        align-items: center;
    }
    #clue-sidebar {
        display: none;
    }
}
#puzzle input {
    width: 100%;
    height: 100%;
    font-size: 40px;
    font-weight: 300;
    font-family: 'Quicksand', sans-serif;
    text-align: center;
    text-transform: uppercase;
    border: none;
    outline: none;
    background: transparent;
}
.highlighted {
    box-shadow: inset 0 0 0 9999px rgba(0, 100, 255, 0.2);
}
.cell-wrapper {
    background: white;
    border: 1px solid #333;
    box-sizing: border-box;
}
.puzzle-scaler {
    width: 100%;
    max-width: 90vw;
    aspect-ratio: calc(var(--puzzle-width) / var(--puzzle-height));
    position: relative;
    margin: auto;
}
.puzzle-scaler svg,
.puzzle-scaler .input-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
#mobile-instructions {
    margin: 0 20px;
}
#active-clue-popup {
    font-size: 11px;
    padding: 14px 18px;
    margin: 20px 10px 5px;
    max-width: 600px;
    background: #f7f9fc;
    border: none;
    border-left: 3px solid #023E7C;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(2, 62, 124, 0.1);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#active-clue-popup strong {
    color: #023E7C;
}
@media (min-width: 769px) {
    #mobile-instructions {
        display: none !important;
    }
}
@media (min-width: 769px) {
    #active-clue-popup {
        display: none !important;
    }
}
