
.tool-page-hero {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.5), transparent 32%),
        linear-gradient(135deg, #ff9a9e, #fad0c4, #fbc2eb, #a18cd1);
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.16);
}

.tool-page-hero h1 {
    font-size: 42px;
    margin: 0 0 12px;
    text-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

.tool-page-hero p {
    font-size: 20px;
    max-width: 760px;
    margin: 0 auto 24px;
}

.game-box {
    max-width: 900px;
    margin: 40px auto;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.95), transparent 35%),
        linear-gradient(135deg, #ffffff, #fff0fa, #f4edff);
    padding: 30px;
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.game-label {
    color: #5b4fd6;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
}

.game-status {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0 20px;
}

.status-pill {
    background: #fff;
    color: #5b4fd6;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.09);
}

.category-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 10px;
}

.category-pills button {
    border: none;
    background: #fff;
    color: #5b4fd6;
    padding: 9px 13px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.09);
}

.category-pills button:hover,
.category-pills button.active-category {
    background: #fff0fa;
}

.game-card {
    background: #fff;
    color: #333;
    padding: 26px 20px;
    border-radius: 24px;
    box-shadow: 0 7px 18px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.pattern-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px auto 22px;
}

.pattern-item {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #f4edff, #fff0fa);
    font-size: 34px;
    font-weight: bold;
    box-shadow: 0 5px 14px rgba(0,0,0,0.1);
}

.pattern-item.question-mark {
    background: linear-gradient(135deg, #fff7d6, #fff0fa);
    color: #5b4fd6;
    font-size: 30px;
}

.question-box {
    max-width: 680px;
    margin: 0 auto 18px;
    padding: 15px 18px;
    border-radius: 18px;
    background: #fff7d6;
    color: #6d5316;
    font-weight: bold;
    font-size: 18px;
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(170px, 1fr));
    gap: 12px;
    max-width: 620px;
    margin: 18px auto 0;
}

.answer-option {
    border: none;
    min-height: 66px;
    padding: 12px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, #f4edff);
    color: #4a3fd1;
    font-family: inherit;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background 0.2s ease;
}

.answer-option:hover {
    transform: translateY(-2px);
    background: #fff0fa;
}

.answer-option.correct {
    background: #d9ffe3;
    color: #176b2c;
}

.answer-option.wrong {
    background: #ffe1e6;
    color: #9e2843;
}

.answer-option:disabled {
    cursor: default;
}

.feedback-box {
    min-height: 72px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    color: #5b4fd6;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.generator-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.generator-buttons button,
.generator-buttons a {
    border: none;
    background: #4a6cf7;
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background 0.2s ease;
}

.generator-buttons button:hover,
.generator-buttons a:hover {
    background: #5b4fd6;
    transform: translateY(-2px);
}

.helper-box {
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    margin-top: 24px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.book-links-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.book-links-list a {
    display: block;
    background: linear-gradient(135deg, #fff, #f4edff);
    padding: 14px 16px;
    border-radius: 18px;
    text-decoration: none;
    color: #4a3fd1;
    box-shadow: 0 5px 14px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    .tool-page-hero {
        padding: 48px 16px;
    }

    .tool-page-hero h1 {
        font-size: 34px;
    }

    .tool-page-hero p {
        font-size: 18px;
    }

    .game-box {
        padding: 22px;
        margin: 28px auto;
    }

    .pattern-row {
        gap: 7px;
    }

    .pattern-item {
        width: 52px;
        height: 52px;
        border-radius: 15px;
        font-size: 28px;
    }

    .answer-options {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .answer-option {
        min-height: 58px;
        font-size: 25px;
    }

    .generator-buttons button,
    .generator-buttons a {
        font-size: 15px;
        padding: 10px 15px;
    }
}

@media (max-width: 380px) {
    .pattern-item {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}
