body
{
   background-color: #FFFFFF;
   color: #000000;
   font-family: Arial;
   font-weight: normal;
   font-size: 16px;
   line-height: 1.1875;
   margin: 0;
   padding: 0;
}
#cookie-bar 
{
   background: #111111; 
   color: #EEEEEE;
   font-family: "Arial";
   font-size: 15px;
   text-align: center; 
   padding: 16px 0;
}
#cookie-bar.fixed 
{
   position: fixed; 
   top: 0; 
   left: 0; 
   width: 100%;
}
#cookie-bar.fixed.bottom 
{
   bottom: 0; 
   top: auto;
}
#cookie-bar p 
{
   margin: 0; 
   padding: 0;
}
#cookie-bar a 
{
   color: #FFFFFF; 
   display: inline-block; 
   border-radius: 3px; 
   text-decoration: none; 
   padding: 4px 6px; 
   margin-left: 8px;
}
#cookie-bar .cb-enable 
{
   background: #007700;
}
#cookie-bar .cb-enable:hover 
{
   background: #009900;
}
#cookie-bar .cb-disable 
{
   background: #990000;
}
#cookie-bar .cb-disable:hover 
{
   background: #BB0000;
}
#cookie-bar .cb-policy 
{
   background: #0033BB;
}
#cookie-bar .cb-policy:hover 
{
   background: #0055DD;
}
    * {
        box-sizing: border-box;
    }

    body {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        color: #f4e4c1;
    }

    /* Tema: Middelalder (standard) */
    body.theme-medieval {
        background:
            radial-gradient(circle at top, rgba(255,255,255,0.04), rgba(0,0,0,0.9)),
            repeating-linear-gradient(
                90deg,
                #3a2410 0px,
                #3a2410 40px,
                #2a180a 40px,
                #2a180a 80px
            );
        background-attachment: fixed;
    }

    /* Tema: Klassisk grøn filt */
    body.theme-classic {
        background:
            radial-gradient(circle at top, rgba(255,255,255,0.06), rgba(0,0,0,0.9)),
            radial-gradient(circle at center, #0f6a24, #063813 60%, #021208 100%);
        background-attachment: fixed;
    }

    .game-container {
        max-width: 1200px;
        margin: 10px auto 40px;
        padding: 16px;
    }

    .title {
        font-family: "UnifrakturCook", cursive;
        font-size: 40px;
        text-align: center;
        margin-bottom: 8px;
        color: #f7e3a6;
        text-shadow: 0 0 8px rgba(0,0,0,0.8);
    }

    .sub-title {
        text-align: center;
        font-size: 14px;
        opacity: 0.8;
        margin-bottom: 14px;
    }

    .status-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        background: rgba(15, 8, 4, 0.95);
        padding: 8px 12px;
        border-radius: 10px;
        border: 1px solid rgba(245, 222, 179, 0.25);
    }

    .status-group {
        display: flex;
        gap: 18px;
        align-items: center;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .status-block {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .status-label {
        font-weight: 600;
        color: #f5d9a3;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    #timer, #best-time-display, #score, #best-score-display, #moves {
        font-family: "UnifrakturCook", cursive;
        letter-spacing: 1px;
        font-size: 18px;
    }

    .btn {
        background: linear-gradient(to bottom, #c9a25b, #8f6b34);
        border: 1px solid #f4e4c1;
        color: #1b130d;
        padding: 6px 16px;
        border-radius: 20px;
        cursor: pointer;
        font-weight: 600;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .btn:hover {
        filter: brightness(1.1);
    }

    .btn-secondary {
        background: linear-gradient(to bottom, #555, #222);
        color: #f4e4c1;
        border-color: #f4e4c1;
    }

    .board {
        margin-top: 16px;
        padding: 12px;
        border-radius: 18px;
        border: 1px solid rgba(245, 222, 179, 0.35);
        box-shadow: 0 0 30px rgba(0,0,0,0.7);
    }

    body.theme-medieval .board {
        background: radial-gradient(circle at top, rgba(87,56,27,0.9), rgba(10,6,4,0.98));
    }

    body.theme-classic .board {
        background: radial-gradient(circle at center, #0b5d1e, #053015 60%, #021007 100%);
    }

    .top-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 18px;
    }

    .stock-area, .foundation-area {
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }

    .pile-label {
        font-size: 11px;
        text-align: center;
        margin-top: 4px;
        opacity: 0.75;
    }

    .pile {
        width: 100px;
        height: 120px;
        border-radius: 10px;
        border: 1px dashed rgba(244, 228, 193, 0.25);
        position: relative;
        background: radial-gradient(circle at top, rgba(70,46,20,0.8), rgba(35,22,11,0.9));
    }

    .pile.stock {
        cursor: pointer;
    }

    .pile.stock.empty {
        opacity: 0.3;
    }

    .pile.foundation {
        text-align: center;
        font-size: 30px;
        line-height: 100px;
        color: rgba(244, 228, 193, 0.4);
    }

    .pile.foundation.has-card {
        border-style: solid;
    }

    .pile.tableau {
        width: 100px;
        height: 360px;
        padding-top: 4px;
    }

    .tableau-row {
        display: flex;
        gap: 15px;
        justify-content: center;
    }

    .card {
        width: 100px;
        height: 120px;
        border-radius: 8px;
        position: absolute;
        left: 2px;
        background: #f5e4c4;
        border: 1px solid #a9864a;
        box-shadow: 0 0 6px rgba(0,0,0,0.7);
        padding: 4px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background-image:
            radial-gradient(circle at top left, rgba(255,255,255,0.35), rgba(255,255,255,0) 40%),
            linear-gradient(135deg, rgba(255,255,255,0.1), rgba(0,0,0,0.1));
        overflow: hidden;
    }

    .card-back {
        background:
            repeating-linear-gradient(
                45deg,
                #6c3a1d,
                #6c3a1d 6px,
                #602410 6px,
                #602410 12px
            ),
            radial-gradient(circle at center, rgba(255,255,255,0.1), rgba(0,0,0,0.7));
        border: 1px solid #f0b07a;
        position: absolute;
    }

    .card-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .card-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
        justify-content: space-between;
    }

    .card-rank {
        font-weight: 700;
        font-size: 16px;
    }

    .card-suit {
        font-size: 16px;
    }

    .card-corner {
        text-align: left;
    }

    .card-center {
        text-align: center;
        font-size: 20px;
    }

    .red {
        color: #b01926;
    }

    .black {
        color: #171111;
    }

    .card.selected {
        outline: 3px solid #f0d47a;
        outline-offset: 1px;
        box-shadow: 0 0 10px rgba(240,212,122,0.8);
    }

    .waste .card {
        left: 0;
    }

    .stock-count {
        position: absolute;
        bottom: 4px;
        right: 6px;
        font-size: 11px;
        color: rgba(244, 228, 193, 0.8);
    }

    .help-text {
        margin-top: 10px;
        font-size: 14px;
        opacity: 0.85;
        text-align: center;
    }

    @media (max-width: 900px) {
        .board {
            transform: scale(0.9);
            transform-origin: top center;
        }
    }

    @media (max-width: 700px) {
        .board {
            transform: scale(0.8);
        }
        .status-bar {
            flex-direction: column;
            align-items: flex-start;
        }
    }
