/* Import Local Karnak Condensed Font */
@font-face {
    font-family: 'Karnak Condensed';
    src: url('./fonts/karnakcondensed-normal-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Import Local Franklin Font */
@font-face {
    font-family: 'Franklin';
    src: url('./fonts/franklin-normal-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #F7F5F2;
    color: #1A1A1A;
    line-height: 1.4;
    padding-top: 16px;
}

/* Main Container */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #F7F5F2;
}

/* Top Section Layout */
.top-section {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

/* Game Board Styles */
.game-board {
    flex: 1;
    position: relative;
    width: 100%;
    height: 450px; /* Increased height to accommodate solo section */
}

.board-section {
    position: relative;
    margin-bottom: 10px;
}

.bridge-section {
    display: grid;
    grid-template-columns: repeat(25, 30px);
    grid-template-rows: repeat(2, 30px);
    gap: 3px;
    margin: 10px auto;
    position: relative;
    width: fit-content;
}

.bridge-section .grid-cell:nth-child(19) { grid-column: 19; }
.bridge-section .grid-cell:nth-child(20) { grid-column: 20; }
.bridge-section .grid-cell:nth-child(21) { grid-column: 21; }
.bridge-section .grid-cell:nth-child(22) { grid-column: 22; }
.bridge-section .grid-cell:nth-child(23) { grid-column: 23; }
.bridge-section .grid-cell:nth-child(24) { grid-column: 24; }
.bridge-section .grid-cell:nth-child(25) { grid-column: 25; }
.bridge-section .grid-cell:nth-child(26) { grid-column: 19; }
.bridge-section .grid-cell:nth-child(27) { grid-column: 20; }
.bridge-section .grid-cell:nth-child(28) { grid-column: 21; }
.bridge-section .grid-cell:nth-child(29) { grid-column: 22; }
.bridge-section .grid-cell:nth-child(30) { grid-column: 23; }
.bridge-section .grid-cell:nth-child(31) { grid-column: 24; }
.bridge-section .grid-cell:nth-child(32) { grid-column: 25; }

.bridge-section .grid-cell:nth-child(-n+18),
.bridge-section .grid-cell:nth-child(n+33) {
    display: none;
}

.section-label {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-family: 'Karnak Condensed', 'Arial', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #1A1A1A;
    z-index: 10;
}

.start-label {
    left: -20px;
}

.finish-label {
    left: -20px;
}

/* Grid System */
.grid-container {
    display: grid;
    grid-template-columns: repeat(25, 30px);
    gap: 3px;
    width: fit-content;
    margin: 0 auto;
}

.grid-cell {
    width: 30px;
    height: 30px;
    /* border: 4px solid #8A8862; */
    background-color: #d1d1d1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.grid-cell:hover {
    border-color: #C46237;
}

.grid-cell.clicked {
    background-color: #C46237;
    border-color: #C46237;
}

.grid-cell.obstacle {
    background-color: #8A8862;
}

.grid-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    z-index: 5;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Solo Section */
.solo-section {
    width: 120px;
    text-align: center;
}

.solo-title {
    font-family: 'Karnak Condensed', 'Arial', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 10px;
}

.score-circles {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
}

.score-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.score-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #8A8862;
    border-radius: 50%;
    background-color: #F7F5F2;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.score-circle:hover {
    border-color: #C46237;
}

.score-circle.clicked {
    background-color: #C46237;
    border-color: #C46237;
}

/* Dice Roll Button */
.dice-roll-button {
    margin-top: 20px;
    padding: 8px 16px;
    background-color: #d1d1d1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: 'Franklin', 'Arial', sans-serif;
    width: 100%;
    max-width: 80px;
    margin-left: auto;
    margin-right: auto;
}

.dice-roll-button:hover {
    background-color: #C46237;
    color: #F7F5F2;
}

.dice-roll-button:active {
    transform: translateY(1px);
}

.dice-icon {
    font-size: 48px;
    line-height: 1;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}

.dice-text {
    font-size: 14px;
    font-weight: 700;
    color: inherit;
}

/* Bottom Section Layout */
.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 40px;
}

/* Bonuses Section */
.bonuses-section {
    background-color: #F7F5F2;
}

.section-title {
    font-family: 'Karnak Condensed', 'Arial', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    text-align: center;
    margin-bottom: 20px;
}

.bonuses-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.bonus-column {
    text-align: center;
}

.bonus-title {
    font-family: 'Franklin', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 15px;
}

.shape-row {
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px dashed #D1A054;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* CSS Shapes for Bonuses Section */
.css-shape {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Triangle Shapes - Using SVG approach for better dashed outlines */
.triangle-green,
.triangle-yellow,
.triangle-pink {
    width: 40px;
    height: 40px;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.triangle-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2 L38 33 L2 33 Z' fill='none' stroke='%23C46237' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.triangle-yellow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2 L38 33 L2 33 Z' fill='none' stroke='%23D1A054' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.triangle-pink::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2 L38 33 L2 33 Z' fill='none' stroke='%238A8862' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Square Shapes - Using SVG for dashed squares */
.square-green,
.square-yellow,
.square-pink {
    width: 40px;
    height: 40px;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.square-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='2' y='2' width='36' height='36' fill='none' stroke='%23C46237' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.square-yellow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='2' y='2' width='36' height='36' fill='none' stroke='%23D1A054' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.square-pink::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='2' y='2' width='36' height='36' fill='none' stroke='%238A8862' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Pentagon Shapes - Using SVG for dashed pentagons */
.pentagon-green,
.pentagon-yellow,
.pentagon-pink {
    width: 40px;
    height: 40px;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pentagon-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L28 10 L25 26 L7 26 L4 10 Z' fill='none' stroke='%23C46237' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.pentagon-yellow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L28 10 L25 26 L7 26 L4 10 Z' fill='none' stroke='%23D1A054' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.pentagon-pink::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L28 10 L25 26 L7 26 L4 10 Z' fill='none' stroke='%238A8862' stroke-width='2' stroke-dasharray='4,2'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Shape Numbers */
.shape-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 16px;
    color: #1A1A1A;
    z-index: 10;
}

/* Path Shapes Section */
.path-shapes-section {
    background-color: #F7F5F2;
}

.path-shapes-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.path-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.path-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dashed #D1A054;
    min-height: 50px;
    justify-content: flex-start;
}

.path-label {
    font-size: 14px;
    font-weight: bold;
    color: #333333;
    min-width: 60px;
}

/* Polyomino Shapes - Individual squares */
.polyomino {
    display: grid;
    gap: 1px;
    position: relative;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

.poly-square {
    width: 11px;
    height: 11px;
    background-color: #1A1A1A;
    border: none;
}

/* 5-square L-shape (2 & 12) */
.l-shape-5 {
    grid-template-columns: 11px 11px 11px;
    grid-template-rows: 11px 11px 11px;
}

.l-shape-5 .poly-square:nth-child(1) { grid-column: 1; grid-row: 1; }
.l-shape-5 .poly-square:nth-child(2) { grid-column: 2; grid-row: 1; }
.l-shape-5 .poly-square:nth-child(3) { grid-column: 3; grid-row: 1; }
.l-shape-5 .poly-square:nth-child(4) { grid-column: 3; grid-row: 2; }
.l-shape-5 .poly-square:nth-child(5) { grid-column: 3; grid-row: 3; }

/* 5-square straight (3 & 11) */
.straight-5 {
    grid-template-columns: 11px;
    grid-template-rows: 11px 11px 11px 11px 11px;
}

/* 4-square straight (3 & 11) */
.straight-4 {
    grid-template-columns: 11px;
    grid-template-rows: 11px 11px 11px 11px;
}

/* 5-square Z-shape (4 & 10) */
.z-shape-5 {
    grid-template-columns: 11px 11px 11px;
    grid-template-rows: 11px 11px 11px;
}

.z-shape-5 .poly-square:nth-child(1) { grid-column: 1; grid-row: 1; }
.z-shape-5 .poly-square:nth-child(2) { grid-column: 2; grid-row: 1; }
.z-shape-5 .poly-square:nth-child(3) { grid-column: 2; grid-row: 2; }
.z-shape-5 .poly-square:nth-child(4) { grid-column: 2; grid-row: 3; }
.z-shape-5 .poly-square:nth-child(5) { grid-column: 3; grid-row: 3; }

/* 4-square T-shape (5 & 9) */
.t-shape-4 {
    grid-template-columns: 11px 11px 11px;
    grid-template-rows: 11px 11px;
}

.t-shape-4 .poly-square:nth-child(1) { grid-column: 1; grid-row: 1; }
.t-shape-4 .poly-square:nth-child(2) { grid-column: 2; grid-row: 1; }
.t-shape-4 .poly-square:nth-child(3) { grid-column: 3; grid-row: 1; }
.t-shape-4 .poly-square:nth-child(4) { grid-column: 2; grid-row: 2; }

/* 4-square L-shape (6 & 8) */
.l-shape-4 {
    grid-template-columns: 11px 11px 11px;
    grid-template-rows: 11px 11px 11px;
}

.l-shape-4 .poly-square:nth-child(1) { grid-column: 1; grid-row: 1; }
.l-shape-4 .poly-square:nth-child(2) { grid-column: 1; grid-row: 2; }
.l-shape-4 .poly-square:nth-child(3) { grid-column: 1; grid-row: 3; }
.l-shape-4 .poly-square:nth-child(4) { grid-column: 2; grid-row: 1; }

/* 3-square straight (7) */
.straight-3 {
    grid-template-columns: 11px;
    grid-template-rows: 11px 11px 11px;
}

/* Scoring Section */
.scoring-section {
    background-color: #F7F5F2;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.scoring-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    gap: 5px;
}

.scoring-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    align-items: stretch;
}

.scoring-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.decor-leaf, .decor-flower, .decor-deer {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.scoring-label {
    font-size: 14px;
    font-weight: bold;
    color: #333333;
}

.score-tracker {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    margin-bottom: 8px;
}

.score-tracker .score-circle {
    width: 16px;
    height: 16px;
}

.score-input-line {
    width: 100%;
    height: 1px;
    background-color: #757575;
    margin-top: auto;
    margin-bottom: 5px;
}

/* Deer Scoring Table */
.deer-scoring-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    text-align: center;
}

.scoring-row {
    font-weight: bold;
    color: #333333;
    font-size: 14px;
}

/* Scoring Summary */
.scoring-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 5px;
    padding-top: 0;
    align-self: flex-start;
    margin-bottom: 1px;
}

.summary-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.summary-section-title {
    font-family: 'Karnak Condensed', 'Arial', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
    line-height: 0.9;
}


.summary-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.summary-line-dash {
    font-family: 'Karnak Condensed', 'Arial', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #C46237;
    letter-spacing: 2px;
    text-align: center;
    line-height: 1;
}


.summary-section:last-child {
    gap: 15px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}





/* Responsive Design */
@media (max-width: 1024px) {
    .top-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .solo-section {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    
    .score-circles {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .bottom-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .scoring-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .grid-cell {
        width: 20px;
        height: 20px;
    }
    
    .section-label {
        font-size: 18px;
        left: -25px;
    }
    
    .scoring-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bonuses-content {
        grid-template-columns: 1fr;
    }
    
    .path-shapes-content {
        grid-template-columns: 1fr;
    }
}

