:root {
    --scale-factor: 1;
    --pixel-ratio: 1;
    --logical-height: 700px;
    --primary-color: #0056b3;
    --secondary-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #343a40;
    --color-text-secondary: #343a40;
    --color-text-secondary: #ffffff;
    --surface: #13131a;
    --color-background-secondary: #2a2a3a;
    --color-background-primary: #fefefe;
    --color-text-bright:#ffffff;
    --accent: #e8ff47;
    --accent2: #ff4778;
    --color-border-secondary: #4e4e8d;
    --color-text-secondary: #7d7d81;
    --color-border-tertiary: #434345;
    --color-text-primary: #ffffff;
    --text-dim: #6a6a8a;
    --correct: #47ffaa;
    --tile-border: #2a2a3a;
    --tile-correct: #47ffaa44;
    --border-radius-lg: 4px;
    --gap: 0px;
    --greenborder: #2d5227;
    --border-radius-md: 5px;
    --font-sans: sans-serif;
}

.eraser{
    display: flex;
    justify-content: center; /* Poziom */
    align-items: center;     /* Pion */
    border: 0.5px solid #000000;
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.erase-active{
    border: 0.5px solid #ff0000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 580px;
}

#shape-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0 auto;
    /* Centruje cały pasek względem rodzica (#app) */
    max-width: 985px;
    /* Przykładowa szerokość - dostosuj do potrzeb */
    width: fit-content;
}

.thumb {
    width: 100px;
    height: 100px;
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background-primary);
    flex-shrink: 0;
    padding: 5px;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.thumb:hover {
    border-color: var(--color-border-secondary);
}

.thumb.active {
    border: 2px solid #378ADD;
}

.thumb svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

#toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    /*border-bottom: 0.5px solid var(--color-border-tertiary);*/
    flex-wrap: wrap;
}

.tool-label {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--color-text-primary);
}

#width-val {
    font-size: 12px;
    font-weight: 500;
    min-width: 18px;
    color: var(--color-text-primary);
}

.tbtn {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--border-radius-md);
    border: 0.5px solid var(--color-border-secondary);
    background: transparent;
    color: var(--color-text-secondary) !important;
    cursor: pointer;
    white-space: nowrap;
}

.tbtn:hover {
    background: var(--color-background-secondary);
    color: var(--color-text-bright) !important;
}

#canvas-wrap {
    position: relative;
    /*flex: 1;*/
    width: 100%;
    max-width: 1000px;
    /*aspect-ratio: 4/3;*/
    height: var(--logical-height);
    max-height: 900px;
    background: var(--color-background-primary);
    margin-left: auto;
    margin-right: auto;
    border: 0.5px solid var(--color-border-secondary);
}

#canvas-bg,
#canvas-draw {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#canvas-bg {
    pointer-events: none;
}

#canvas-draw {
    cursor: crosshair;
    touch-action: none;
}

#hint {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 15px;
    color: var(--color-text-secondary);
    pointer-events: none;
    opacity: 0.7;
}

.header-title {
    font-size: 2.2rem;
    color: rgb(18, 55, 21);
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {

    .header-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem !important;
    }

    #hint {
        font-size: 12px;
    }
    .smallHide{
        display: none;
    }
}


        /******************/
        .hero-game-section {
            background: linear-gradient(135deg, #43b8e3 0%, #2c549e 100%);
            color: white;
            padding: 20px 0;
            border-radius: 20px;
            margin-bottom: 40px;
        }
        .feature-card {
            border: none;
            border-radius: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: transform 0.3s ease;
            height: 100%;
        }
        .feature-card:hover {
            transform: translateY(-5px);
        }
        .icon-box {
            font-size: 2.5rem;
            margin-bottom: 15px;
            color: #764ba2;
        }
        .highlight-text {
            color: #764ba2;
            font-weight: 600;
        }