/* ================================================================
   ГИД ПО ВЫБОРУ PYTHON-ФРЕЙМВОРКА
   ================================================================ */

.pfg-root {
    padding: 28px 32px;
}

@media (max-width: 640px) {
    .pfg-root { padding: 18px 14px; }
}

/* ---------- Тулбар ---------- */
.pfg-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--line, #E8E2DA);
}

.pfg-toolbar__left,
.pfg-toolbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pfg-toolbar__label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6B6470;
}

.pfg-progress {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #2A1745;
    background: #C6F432;
    padding: 5px 14px;
    border-radius: 999px;
}

.pfg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid #E8E2DA;
    background: #fff;
    border-radius: 999px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2A1745;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .15s;
    white-space: nowrap;
}

.pfg-btn:hover:not(:disabled) {
    border-color: #6B3FA0;
    background: #EDE4FF;
    transform: translateY(-1px);
}

.pfg-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ---------- Змейка ---------- */
.pfg-snake-wrap {
    position: relative;
    width: 100%;
    height: 460px;
    background: linear-gradient(180deg, #FAF6F0 0%, #F0E9DC 100%);
    border-radius: 16px;
    border: 1px solid #E8E2DA;
    margin-bottom: 22px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .pfg-snake-wrap { height: 360px; }
}

.pfg-snake {
    display: block;
    width: 100%;
    height: 100%;
}

.pfg-snake-body {
    fill: none;
    stroke: url(#pfgBodyGrad);
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .18));
    transition: stroke-width .4s ease;
}

.pfg-snake-head {
    transition: transform .35s cubic-bezier(.5, 1.6, .5, 1);
}

.pfg-head-shape {
    fill: url(#pfgHeadGrad);
    stroke: #1B5E20;
    stroke-width: 1.5;
}

.pfg-head-belly {
    fill: rgba(255, 255, 255, .35);
    stroke: none;
}

.pfg-eye {
    fill: #FFFDE7;
    stroke: #2E7D32;
    stroke-width: 1;
}

.pfg-pupil {
    fill: #1A1420;
}

.pfg-nostril {
    stroke: #1B5E20;
    stroke-width: 1.4;
    stroke-linecap: round;
    fill: none;
}

.pfg-mouth {
    stroke: #1B5E20;
    stroke-width: 1.6;
    stroke-linecap: round;
    fill: none;
}

.pfg-tongue {
    transform-origin: 0 12px;
    animation: pfgTongueFlick 2.5s ease-in-out infinite;
}

.pfg-tongue-line,
.pfg-tongue-fork {
    stroke: #E53935;
    stroke-width: 1.8;
    stroke-linecap: round;
    fill: none;
}

@keyframes pfgTongueFlick {
    0%, 60%, 100% { transform: scaleY(.4); }
    30%           { transform: scaleY(1.1); }
    45%           { transform: scaleY(.8); }
}

.pfg-snake-head.is-chomping .pfg-head-shape {
    animation: pfgChomp .45s ease;
}

@keyframes pfgChomp {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); }
    70%  { transform: scale(.95); }
    100% { transform: scale(1); }
}

/* След съеденной еды — эмодзи вдоль тела */
.pfg-food-trail {
    pointer-events: none;
}

.pfg-food-item {
    font-size: 13px;
    text-anchor: middle;
    dominant-baseline: middle;
    opacity: .75;
    animation: pfgFoodAppear .5s ease forwards;
}

@keyframes pfgFoodAppear {
    from { opacity: 0; transform: scale(.3); }
    to   { opacity: .75; transform: scale(1); }
}

/* Летящее эмодзи (при поедании) */
.pfg-flying-food {
    font-size: 32px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    animation: pfgFlyToHead .55s cubic-bezier(.5, -0.2, .7, 1) forwards;
    transform-origin: center;
}

@keyframes pfgFlyToHead {
    0%   { opacity: 1; transform: translate(0, 0) scale(1.4); }
    60%  { opacity: 1; transform: translate(var(--fx, 0), var(--fy, 0)) scale(1); }
    100% { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 0)) scale(.15); }
}

/* Вспышка-хруст на голове */
.pfg-crunch {
    font-size: 26px;
    text-anchor: middle;
    pointer-events: none;
    animation: pfgCrunch .6s ease forwards;
}

@keyframes pfgCrunch {
    0%   { opacity: 0; transform: translate(0, 0) scale(.5); }
    40%  { opacity: 1; transform: translate(0, -8) scale(1.4); }
    100% { opacity: 0; transform: translate(0, -20) scale(.8); }
}

/* ---------- Текущий вопрос ---------- */
.pfg-question {
    padding: 22px 24px;
    background: #fff;
    border: 1.5px solid #E8E2DA;
    border-radius: 16px;
    margin-bottom: 18px;
    animation: pfgFadeIn .35s ease;
}

@keyframes pfgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pfg-question__step {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #6B3FA0;
    margin-bottom: 8px;
    font-weight: 700;
}

.pfg-question__title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 22px;
    color: #2A1745;
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.pfg-question__desc {
    font-size: 14.5px;
    line-height: 1.5;
    color: #6B6470;
    margin: 0 0 18px;
}

.pfg-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.pfg-option {
    text-align: left;
    padding: 14px 16px;
    background: #FAF6F0;
    border: 1.5px solid #E8E2DA;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #1A1420;
    transition: border-color .2s, background .2s, transform .15s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pfg-option:hover {
    border-color: #6B3FA0;
    background: #EDE4FF;
    transform: translateY(-2px);
}

.pfg-option__emoji {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform .2s;
}

.pfg-option:hover .pfg-option__emoji {
    transform: scale(1.15) rotate(-6deg);
}

.pfg-option__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.pfg-option__label {
    font-weight: 600;
    color: #2A1745;
}

.pfg-option__hint {
    font-size: 12.5px;
    color: #6B6470;
    line-height: 1.4;
}

/* ---------- Хлебные крошки ---------- */
.pfg-path {
    padding: 12px 18px;
    background: #FAF6F0;
    border-radius: 12px;
    border: 1px dashed #E8E2DA;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 13px;
}

.pfg-path__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #E8E2DA;
    border-radius: 999px;
    color: #2A1745;
    font-weight: 500;
}

.pfg-path__sep {
    color: #6B6470;
    font-weight: 700;
}

/* ---------- Результат ---------- */
.pfg-result {
    padding: 28px 30px;
    background: linear-gradient(135deg, #FAF6F0 0%, #E8F5E9 100%);
    border: 2px solid #4CAF50;
    border-radius: 18px;
    animation: pfgFadeIn .4s ease;
    margin-bottom: 18px;
}

@media (max-width: 640px) {
    .pfg-result { padding: 20px 16px; }
}

.pfg-result__tag {
    display: inline-block;
    padding: 5px 14px;
    background: #C6F432;
    color: #2A1745;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
    margin-bottom: 14px;
}

.pfg-result__title {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: 28px;
    color: #1B5E20;
    margin: 0 0 12px;
    line-height: 1.15;
    letter-spacing: -.02em;
}

@media (max-width: 640px) {
    .pfg-result__title { font-size: 22px; }
}

.pfg-result__desc {
    font-size: 15px;
    line-height: 1.6;
    color: #1A1420;
    margin: 0 0 22px;
}

/* Итоговый стек */
.pfg-result__stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, .7);
    border-radius: 14px;
}

.pfg-stack-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    min-width: 0;
}

.pfg-stack-item__emoji {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.pfg-stack-item__body {
    min-width: 0;
}

.pfg-stack-item__label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #6B6470;
    margin-bottom: 3px;
}

.pfg-stack-item__value {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1B5E20;
    line-height: 1.3;
}

.pfg-result__section { margin-bottom: 18px; }
.pfg-result__section:last-child { margin-bottom: 0; }

.pfg-result__section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
    margin-bottom: 8px;
}

.pfg-result__section-title--pros { color: #2E7D32; }
.pfg-result__section-title--cons { color: #C0392B; }
.pfg-result__section-title--extra { color: #6B3FA0; }
.pfg-result__section-title--storage { color: #1976D2; }
.pfg-result__section-title--deploy { color: #7B1FA2; }

.pfg-result__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pfg-result__list li {
    position: relative;
    padding: 8px 12px 8px 32px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, .65);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #1A1420;
}

.pfg-result__list li::before {
    content: '✓';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.pfg-result__list--pros li::before { background: #C8E6C9; color: #1B5E20; content: '+'; }
.pfg-result__list--cons li::before { background: #FFCDD2; color: #B71C1C; content: '−'; }
.pfg-result__list--extra li::before { background: #E1BEE7; color: #4A148C; content: '★'; }

/* Текстовый блок рекомендаций (для storage и deploy) */
.pfg-result__advice {
    padding: 16px 18px;
    background: rgba(255, 255, 255, .7);
    border-radius: 12px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #1A1420;
}

.pfg-result__advice strong {
    color: #2A1745;
}

.pfg-result__advice code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: rgba(42, 23, 69, .08);
    color: #2A1745;
    padding: 2px 6px;
    border-radius: 5px;
}

.pfg-result__install {
    display: inline-block;
    margin: 4px 0 14px;
    padding: 10px 16px;
    background: #2A1745;
    color: #C6F432;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: .02em;
    word-break: break-all;
}

.pfg-result__cta {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px dashed rgba(76, 175, 80, .3);
}

.pfg-result__cta p {
    margin: 0 0 12px;
    font-size: 14px;
    color: #6B6470;
}

/* ---------- Адаптив ---------- */
@media (max-width: 640px) {
    .pfg-options { grid-template-columns: 1fr; }
    .pfg-question__title { font-size: 18px; }
    .pfg-option__emoji { font-size: 24px; }
    .pfg-result__stack { grid-template-columns: 1fr; }
}

/* ---------- Печать ---------- */
@media print {
    .nav, .footer, .cursor-dot, .cursor-ring, .mobile-menu,
    .feedback-modal, #feedbackModal, #feedbackToast,
    .pfg-toolbar, .pfg-snake-wrap, .tool-details, .cell--wide,
    .cell--section-title .tag, .cell--section-title p,
    .cell--section-title a { display: none !important; }
    body { background: #fff !important; color: #000 !important; cursor: auto; }
    .wrap { max-width: 100%; padding: 0; margin: 0; }
    .bento { display: block !important; gap: 0 !important; }
    .cell { border: none !important; padding: 0 !important; margin: 0 0 16pt 0 !important; background: #fff !important; }
    .cell--section-title h2 { font-size: 16pt; color: #000 !important; border-bottom: 1pt solid #333; padding-bottom: 8pt; margin-bottom: 12pt; }
    .cell--section-title h2::after { content: " — рекомендованный стек"; }
    .pfg-result { background: #fff !important; border: 1pt solid #333 !important; page-break-inside: avoid; }
    .pfg-result__title { color: #000 !important; }
    .pfg-result__list li,
    .pfg-result__advice,
    .pfg-result__stack { background: #f9f9f9 !important; border: 1pt solid #ccc !important; }
    .pfg-result__cta { display: none !important; }
}