.game-container {
    max-width: 900px;
}

.game-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.back-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.game-header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #667eea;
}

.game-controls {
    margin-bottom: 30px;
    text-align: center;
}

.difficulty-selector h3 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.difficulty-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.difficulty-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.1);
}

.level-btn {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.level-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.level-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.1);
}

.game-area {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    padding: 30px;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.score-item {
    background: white;
    padding: 15px 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.score-label {
    color: #666;
    font-size: 0.9em;
}

.score-value {
    color: #667eea;
    font-size: 2em;
    font-weight: bold;
}

.question-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.question {
    font-size: 3em;
    color: #667eea;
    font-weight: bold;
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.answer-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 25px;
    border-radius: 20px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.answer-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.answer-btn.correct {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    animation: correctPulse 0.5s ease;
}

.answer-btn.wrong {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    animation: shake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.feedback {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    min-height: 50px;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.feedback.correct {
    color: #43e97b;
    background: rgba(67, 233, 123, 0.1);
    animation: slideIn 0.3s ease, glow 2s ease infinite;
}

.feedback.wrong {
    color: #f5576c;
    background: rgba(245, 87, 108, 0.1);
    animation: slideIn 0.3s ease, shake 0.5s ease;
}

.next-btn {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 25px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    display: block;
    margin: 20px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.next-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Alfabet styles */
.letter-display {
    font-size: 8em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
}

.letter-hint {
    font-size: 1.3em;
    color: #666;
}

.letter-image {
    text-align: center;
    font-size: 6em;
    margin: 20px 0;
    min-height: 100px;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.letter-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 2.5em;
    font-weight: bold;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.letter-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.word-display {
    font-size: 3em;
    color: #667eea;
    font-weight: bold;
    letter-spacing: 10px;
    margin: 20px 0;
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.word-slot {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 3px dashed #667eea;
    border-radius: 10px;
    line-height: 60px;
    font-size: 2em;
    color: #667eea;
}

.word-slot.filled {
    border: 3px solid #43e97b;
    background: rgba(67, 233, 123, 0.1);
}

.word-image {
    text-align: center;
    font-size: 6em;
    margin: 20px 0;
    min-height: 100px;
}

.letter-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.bank-letter {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 60px;
}

.bank-letter:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.bank-letter.used {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Kolory styles */
.color-display {
    width: min(200px, 80vw);
    height: min(200px, 80vw);
    max-width: 200px;
    max-height: 200px;
    margin: 20px auto;
    border-radius: 50%;
    border: 5px solid;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: colorPulse 2s ease-in-out infinite;
}

@keyframes colorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.color-name-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-height: 50px;
    word-wrap: break-word;
    text-align: center;
}

.color-name-btn:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.color-name-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.color-name-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.color-name-btn.correct {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    animation: correctPulse 0.5s ease;
}

.color-name-btn.wrong {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    animation: shake 0.5s ease;
}

.matching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 45vw), 1fr));
    gap: 15px;
    margin-top: 30px;
    max-width: 100%;
}

.matching-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 140px;
    justify-content: center;
}

.matching-card:hover:not(.matched) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.matching-card:active:not(.matched) {
    transform: scale(0.98);
}

.matching-card.selected {
    border: 4px solid #667eea;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.matching-card.matched {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
}

.matching-color-box {
    width: min(100px, 25vw);
    height: min(100px, 25vw);
    min-width: 60px;
    min-height: 60px;
    max-width: 100px;
    max-height: 100px;
    border-radius: 15px;
    border: 3px solid #ddd;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.matching-name-box {
    font-size: clamp(0.9em, 2.5vw, 1.2em);
    font-weight: bold;
    color: #667eea;
    text-align: center;
    word-wrap: break-word;
    width: 100%;
}

.mixing-area {
    margin: 30px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.color-mixer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 3vw, 20px);
    flex-wrap: wrap;
    padding: 10px;
}

.color-circle {
    width: min(120px, 25vw);
    height: min(120px, 25vw);
    min-width: 70px;
    min-height: 70px;
    max-width: 120px;
    max-height: 120px;
    border-radius: 50%;
    border: 4px solid #ddd;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2em, 4vw, 2em);
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.mix-symbol, .equals-symbol {
    font-size: clamp(1.5em, 5vw, 3em);
    color: #667eea;
    font-weight: bold;
    flex-shrink: 0;
}

.color-circle.result {
    border: 5px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Puzzle styles */
.puzzle-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.puzzle-board {
    display: grid;
    gap: 5px;
    background: #ddd;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.puzzle-board.size-3 {
    grid-template-columns: repeat(3, 1fr);
}

.puzzle-board.size-4 {
    grid-template-columns: repeat(4, 1fr);
}

.puzzle-board.size-5 {
    grid-template-columns: repeat(5, 1fr);
}

.puzzle-tile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    aspect-ratio: 1;
    min-width: 80px;
    min-height: 80px;
}

.puzzle-tile:hover:not(.empty) {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.puzzle-tile:active:not(.empty) {
    transform: scale(0.98);
}

.puzzle-tile.empty {
    background: rgba(102, 126, 234, 0.1);
    cursor: default;
    box-shadow: none;
    border: 2px dashed rgba(102, 126, 234, 0.3);
}

.puzzle-image-preview {
    font-size: 4em;
    margin: 20px 0;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
}

.puzzle-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.puzzle-controls .next-btn {
    margin: 0;
}

@media (max-width: 768px) {
    .question {
        font-size: 2em;
    }

    .answer-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .letter-display {
        font-size: 4em;
    }

    .letter-image {
        font-size: 4em;
    }

    .letter-btn {
        font-size: 2em;
        padding: 15px;
    }

    .alphabet-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .color-display {
        width: min(150px, 60vw);
        height: min(150px, 60vw);
    }

    .color-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .color-name-btn {
        padding: 12px 15px;
        font-size: 1em;
        min-height: 45px;
    }

    .matching-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .matching-card {
        padding: 12px;
        min-height: 120px;
    }

    .matching-color-box {
        width: min(80px, 20vw);
        height: min(80px, 20vw);
    }

    .puzzle-tile {
        min-width: 60px;
        min-height: 60px;
        font-size: 2em;
    }

    .color-circle {
        width: min(80px, 20vw);
        height: min(80px, 20vw);
    }

    .mix-symbol, .equals-symbol {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .letter-display {
        font-size: 3em;
    }

    .letter-image {
        font-size: 3em;
        margin: 15px 0;
    }

    .letter-btn {
        font-size: 1.5em;
        padding: 12px;
    }

    .alphabet-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .letter-hint {
        font-size: 1em;
    }

    .color-display {
        width: min(120px, 50vw);
        height: min(120px, 50vw);
        border-width: 4px;
    }

    .color-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .color-name-btn {
        padding: 15px;
        font-size: 0.95em;
        width: 100%;
    }

    .matching-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .matching-card {
        padding: 15px;
        min-height: auto;
    }

    .matching-color-box {
        width: 80px;
        height: 80px;
    }

    .color-mixer {
        gap: 8px;
    }

    .color-circle {
        width: min(60px, 18vw);
        height: min(60px, 18vw);
        min-width: 50px;
        min-height: 50px;
        border-width: 3px;
    }

    .mix-symbol, .equals-symbol {
        font-size: 1.5em;
    }

    .question-box {
        padding: 20px;
    }

    .question-box h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 360px) {
    .color-display {
        width: min(100px, 45vw);
        height: min(100px, 45vw);
    }

    .matching-color-box {
        width: 70px;
        height: 70px;
    }

    .color-circle {
        width: 50px;
        height: 50px;
        font-size: 1em;
    }

    .mix-symbol, .equals-symbol {
        font-size: 1.2em;
    }
}

/* Kształty styles */
.shape-display {
    font-size: 8em;
    color: #667eea;
    text-align: center;
    margin: 20px 0;
    line-height: 1;
}

.shape-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.shape-box {
    font-size: 4em;
    text-align: center;
    margin: 10px 0;
    color: #667eea;
}

.shapes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

/* Zwierzeta styles */
.animal-display {
    font-size: 6em;
    text-align: center;
    margin: 20px 0;
}

.sound-display {
    font-size: 2.5em;
    color: #667eea;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
}

.environment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(120px, 30vw), 1fr));
    gap: 15px;
    margin-top: 30px;
}

.animal-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.animal-card:hover:not(.matched) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.animal-card.selected {
    border: 4px solid #667eea;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.animal-card.matched {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
}

.animal-card.correct-highlight {
    border: 4px solid #43e97b;
    background: rgba(67, 233, 123, 0.2);
    box-shadow: 0 5px 15px rgba(67, 233, 123, 0.4);
    animation: pulse 0.5s ease;
}

.animal-card.wrong-highlight {
    border: 4px solid #f5576c;
    background: rgba(245, 87, 108, 0.2);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
    animation: shake 0.3s ease;
}

.animal-checkbox {
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin-bottom: 10px;
    accent-color: #667eea;
    transform: scale(1.3);
    flex-shrink: 0;
}

.animal-card.selected {
    border: 4px solid #667eea;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.animal-card label {
    width: 100%;
    text-align: center;
    user-select: none;
}

.animal-card:has(input[type="checkbox"]:checked) {
    border: 4px solid #667eea;
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.animal-card:has(input[type="checkbox"]:checked) label {
    color: #667eea;
}

/* Pamięć styles */
.memory-board {
    display: grid;
    gap: 10px;
    margin: 30px auto;
    max-width: 600px;
}

.memory-board.level-easy {
    grid-template-columns: repeat(4, 1fr);
}

.memory-board.level-medium {
    grid-template-columns: repeat(4, 1fr);
}

.memory-board.level-hard {
    grid-template-columns: repeat(4, 1fr);
}

.memory-card {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    transition: transform 0.6s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: rotateY(0deg);
}

.card-back {
    background: white;
    transform: rotateY(180deg);
    border: 3px solid #667eea;
}

.memory-card.flipped .card-front {
    transform: rotateY(180deg);
}

.memory-card.flipped .card-back {
    transform: rotateY(0deg);
}

.memory-card.matched {
    opacity: 0.6;
    cursor: not-allowed;
}

.memory-card.matched .card-back {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.3) 100%);
}

@media (max-width: 768px) {
    .shape-display {
        font-size: 5em;
    }

    .shape-box {
        font-size: 3em;
    }

    .environment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .memory-board {
        gap: 8px;
    }

    .card-front, .card-back {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .shape-display {
        font-size: 4em;
    }

    .animal-display {
        font-size: 4em;
    }

    .sound-display {
        font-size: 1.8em;
    }

    .environment-grid {
        grid-template-columns: 1fr;
    }

    .memory-board {
        gap: 6px;
    }

    .card-front, .card-back {
        font-size: 1.5em;
    }
}

/* Zegar styles */
.clock-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

#clockCanvas, #setClockCanvas, #clock1Canvas, #clock2Canvas {
    border: 3px solid #667eea;
    border-radius: 50%;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.clock-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.clock-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.clock-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.clocks-comparison {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.clock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.clock-item p {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
}

/* Liczby Rzymskie styles */
.roman-display {
    font-size: 4em;
    color: #667eea;
    text-align: center;
    margin: 30px 0;
    font-weight: bold;
    letter-spacing: 5px;
}

.roman-number-box {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.roman-roman-box {
    font-size: 2em;
    font-weight: bold;
    color: #764ba2;
    text-align: center;
    padding: 15px;
    background: rgba(118, 75, 162, 0.1);
    border-radius: 10px;
}

@media (max-width: 768px) {
    #clockCanvas, #setClockCanvas {
        width: 250px;
        height: 250px;
    }

    #clock1Canvas, #clock2Canvas {
        width: 150px;
        height: 150px;
    }

    .clocks-comparison {
        gap: 15px;
    }

    .clock-item span {
        font-size: 2em;
    }

    .roman-display {
        font-size: 3em;
    }
}

@media (max-width: 480px) {
    #clockCanvas, #setClockCanvas {
        width: 200px;
        height: 200px;
    }

    #clock1Canvas, #clock2Canvas {
        width: 120px;
        height: 120px;
    }

    .clock-controls {
        gap: 10px;
    }

    .clock-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .roman-display {
        font-size: 2.5em;
    }
}

/* Geografia styles */
.flag-display {
    font-size: 8em;
    text-align: center;
    margin: 30px 0;
}

/* Przyroda styles */
.nature-display {
    font-size: 8em;
    text-align: center;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .flag-display, .nature-display {
        font-size: 6em;
    }
}

@media (max-width: 480px) {
    .flag-display, .nature-display {
        font-size: 5em;
    }
}

/* Muzyka styles */
.music-display {
    font-size: 8em;
    text-align: center;
    margin: 30px 0;
}

.note-display {
    text-align: center;
    margin: 30px 0;
}

.sound-description {
    font-size: 1.8em;
    color: #667eea;
    text-align: center;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .music-display {
        font-size: 6em;
    }

    .sound-description {
        font-size: 1.5em;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .music-display {
        font-size: 5em;
    }

    .sound-description {
        font-size: 1.3em;
        padding: 12px;
    }
}

/* Sudoku styles */
.sudoku-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    overflow-x: auto;
}

.sudoku-board {
    display: grid;
    gap: 2px;
    background: #333;
    padding: 2px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sudoku-board.size-4 {
    grid-template-columns: repeat(4, 1fr);
}

.sudoku-board.size-6 {
    grid-template-columns: repeat(6, 1fr);
}

.sudoku-board.size-9 {
    grid-template-columns: repeat(9, 1fr);
}

.sudoku-cell {
    aspect-ratio: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    min-height: 40px;
}

.sudoku-cell.given {
    background: #f0f0f0;
    color: #000;
    font-weight: bold;
    cursor: default;
}

.sudoku-cell.empty {
    background: white;
    color: #667eea;
}

.sudoku-cell.empty:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.sudoku-cell.selected {
    background: rgba(102, 126, 234, 0.3);
    border: 3px solid #667eea;
    transform: scale(1.1);
    z-index: 10;
}

.sudoku-cell.correct {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
}

.sudoku-cell.wrong {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
    animation: shake 0.3s ease;
}

.sudoku-cell.border-top {
    border-top: 3px solid #333;
}

.sudoku-cell.border-left {
    border-left: 3px solid #333;
}

.number-pad {
    display: grid;
    gap: 10px;
    margin: 30px auto;
    max-width: 400px;
}

.number-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.number-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.number-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .sudoku-cell {
        font-size: 1.2em;
        min-width: 35px;
        min-height: 35px;
    }

    .number-btn {
        padding: 15px;
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .sudoku-cell {
        font-size: 1em;
        min-width: 30px;
        min-height: 30px;
    }

    .number-btn {
        padding: 12px;
        font-size: 1.3em;
    }

    .sudoku-board.size-9 {
        gap: 1px;
    }
}

/* Karty styles */
.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.playing-card {
    width: 120px;
    height: 170px;
    background: white;
    border-radius: 15px;
    border: 3px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: bold;
}

.playing-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.playing-card.red {
    color: #e74c3c;
}

.playing-card.correct {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
    border-color: #43e97b;
    transform: scale(1.1);
}

.playing-card.wrong {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.2) 0%, rgba(255, 0, 0, 0.2) 100%);
    border-color: #f5576c;
    animation: shake 0.3s ease;
}

.playing-card.highlight {
    border: 5px solid #43e97b;
    box-shadow: 0 0 20px rgba(67, 233, 123, 0.5);
}

.card-rank-top, .card-rank-bottom {
    font-size: 1.5em;
    text-align: center;
}

.card-rank-bottom {
    transform: rotate(180deg);
}

.card-suit {
    font-size: 3em;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plus-sign {
    font-size: 3em;
    color: #667eea;
    font-weight: bold;
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px auto;
    max-width: 400px;
}

.answer-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.answer-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.answer-btn.correct {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.answer-btn.wrong {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    animation: shake 0.3s ease;
}

.cards-memory-board {
    display: grid;
    gap: 15px;
    margin: 30px auto;
    max-width: 600px;
}

.memory-card-item {
    aspect-ratio: 0.7;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

.memory-card-item .card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: rotateY(0deg);
    font-size: 3em;
}

.memory-card-item .card-back {
    background: white;
    transform: rotateY(180deg);
    border: 3px solid #667eea;
    padding: 5px;
}

.memory-card-item.flipped .card-front {
    transform: rotateY(180deg);
}

.memory-card-item.flipped .card-back {
    transform: rotateY(0deg);
}

.memory-card-item.matched {
    opacity: 0.6;
    cursor: not-allowed;
}

.memory-card-item.matched .card-back {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.3) 0%, rgba(56, 249, 215, 0.3) 100%);
}

.memory-card-item .card-back .playing-card {
    width: 100%;
    height: 100%;
    border: none;
    box-shadow: none;
    cursor: default;
}

.memory-card-item .card-back .playing-card:hover {
    transform: none;
}

@media (max-width: 768px) {
    .playing-card {
        width: 100px;
        height: 140px;
    }

    .card-suit {
        font-size: 2.5em;
    }

    .cards-container {
        gap: 20px;
    }

    .answers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .answer-btn {
        padding: 15px;
        font-size: 1.5em;
    }

    .cards-memory-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .playing-card {
        width: 80px;
        height: 110px;
    }

    .card-rank-top, .card-rank-bottom {
        font-size: 1.2em;
    }

    .card-suit {
        font-size: 2em;
    }

    .plus-sign {
        font-size: 2em;
    }

    .cards-container {
        gap: 15px;
    }

    .cards-memory-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Statystyki styles */
.stats-container {
    padding: 20px;
}

.stats-container h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.stat-header h3 {
    color: #667eea;
    margin: 0 0 20px 0;
    font-size: 1.5em;
    text-align: center;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.stat-label {
    color: #666;
    font-size: 1em;
}

.stat-value {
    color: #667eea;
    font-size: 1.3em;
    font-weight: bold;
}

.stats-actions {
    text-align: center;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Osiągnięcia styles */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.5s ease;
    max-width: 350px;
}

.achievement-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.achievement-icon {
    font-size: 3em;
    animation: bounce 1s ease infinite;
}

.achievement-text {
    flex: 1;
}

.achievement-title {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 1.2em;
    font-weight: bold;
}

@media (max-width: 480px) {
    .achievement-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .achievement-notification.show {
        transform: translateY(0);
    }
}

