/* ========================================================================
   Generator Portal — Theme Stylesheet
   Neutral blue & white with complementary amber accents
   ======================================================================== */

:root {
    --gp-primary: #2563EB;
    --gp-primary-dark: #1D4ED8;
    --gp-primary-light: #3B82F6;
    --gp-primary-50: #EFF6FF;
    --gp-primary-100: #DBEAFE;
    --gp-secondary: #F59E0B;
    --gp-secondary-dark: #D97706;
    --gp-secondary-light: #FCD34D;
    --gp-bg: #F8FAFC;
    --gp-white: #FFFFFF;
    --gp-text: #1E293B;
    --gp-text-light: #64748B;
    --gp-border: #E2E8F0;
    --gp-border-light: #F1F5F9;
    --gp-success: #10B981;
    --gp-radius: 12px;
    --gp-radius-sm: 8px;
    --gp-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --gp-shadow-lg: 0 10px 25px rgba(37, 99, 235, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    --gp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ── Generator Wrapper ─────────────────────────────────────────────── */

.gp-generator {
    max-width: 720px;
    margin: 0 auto 40px;
    font-family: var(--gp-font);
    color: var(--gp-text);
}

.gp-generator *, .gp-generator *::before, .gp-generator *::after {
    box-sizing: border-box;
}

.gp-generator-header {
    text-align: center;
    margin-bottom: 32px;
}

.gp-generator-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gp-primary-dark);
    margin: 0 0 8px;
    line-height: 1.2;
}

.gp-generator-description {
    font-size: 1.05rem;
    color: var(--gp-text-light);
    margin: 0;
    line-height: 1.6;
}

/* ── Generator Body / Card ─────────────────────────────────────────── */

.gp-generator-body {
    background: var(--gp-white);
    border-radius: var(--gp-radius);
    box-shadow: var(--gp-shadow-lg);
    padding: 32px;
    border: 1px solid var(--gp-border);
}

/* ── Result Display ────────────────────────────────────────────────── */

.gp-result {
    background: var(--gp-primary-50);
    border: 2px solid var(--gp-primary-100);
    border-radius: var(--gp-radius-sm);
    padding: 24px;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.gp-result-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gp-primary-dark);
    line-height: 1.4;
    word-break: break-word;
}

.gp-result-text.gp-result-large {
    font-size: 2rem;
}

.gp-result-text.gp-result-small {
    font-size: 1.1rem;
    font-weight: 500;
}

.gp-result-subtext {
    display: block;
    font-size: 0.9rem;
    color: var(--gp-text-light);
    font-weight: 400;
    margin-top: 6px;
}

/* Animation for new results */
.gp-result.gp-animate {
    animation: gpPulse 0.35s ease;
}

@keyframes gpPulse {
    0% { transform: scale(0.97); opacity: 0.7; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--gp-font);
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--gp-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.gp-btn:focus {
    outline: 3px solid rgba(37, 99, 235, 0.4);
    outline-offset: 2px;
}

.gp-btn-primary {
    background: var(--gp-primary);
    color: var(--gp-white);
}

.gp-btn-primary:hover {
    background: var(--gp-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.gp-btn-primary:active {
    transform: translateY(0);
}

.gp-btn-secondary {
    background: var(--gp-white);
    color: var(--gp-primary);
    border: 2px solid var(--gp-primary);
}

.gp-btn-secondary:hover {
    background: var(--gp-primary-50);
}

.gp-btn-accent {
    background: var(--gp-secondary);
    color: var(--gp-white);
}

.gp-btn-accent:hover {
    background: var(--gp-secondary-dark);
    transform: translateY(-1px);
}

.gp-btn-small {
    font-size: 0.85rem;
    padding: 8px 16px;
}

.gp-btn-block {
    display: flex;
    width: 100%;
}

.gp-btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Form Controls ─────────────────────────────────────────────────── */

.gp-controls {
    margin-bottom: 24px;
}

.gp-control-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.gp-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gp-text);
    min-width: 100px;
}

.gp-select,
.gp-input {
    font-family: var(--gp-font);
    font-size: 0.95rem;
    padding: 10px 14px;
    border: 2px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    background: var(--gp-white);
    color: var(--gp-text);
    transition: border-color 0.2s;
    flex: 1;
    min-width: 0;
}

.gp-select:focus,
.gp-input:focus {
    outline: none;
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.gp-input-number {
    max-width: 100px;
    text-align: center;
}

.gp-textarea {
    font-family: var(--gp-font);
    font-size: 0.95rem;
    padding: 12px 14px;
    border: 2px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    background: var(--gp-white);
    color: var(--gp-text);
    width: 100%;
    min-height: 100px;
    resize: vertical;
    transition: border-color 0.2s;
}

.gp-textarea:focus {
    outline: none;
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ── Tags / Chips ──────────────────────────────────────────────────── */

.gp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.gp-tag {
    font-family: var(--gp-font);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    border: 2px solid var(--gp-border);
    background: var(--gp-white);
    color: var(--gp-text-light);
    transition: all 0.2s;
}

.gp-tag:hover {
    border-color: var(--gp-primary-light);
    color: var(--gp-primary);
}

.gp-tag.active {
    background: var(--gp-primary);
    color: var(--gp-white);
    border-color: var(--gp-primary);
}

/* ── Results List ──────────────────────────────────────────────────── */

.gp-results-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.gp-results-list li {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gp-border-light);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gp-results-list li:last-child {
    border-bottom: none;
}

.gp-results-list li .gp-list-number {
    background: var(--gp-primary);
    color: var(--gp-white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Copy Button ───────────────────────────────────────────────────── */

.gp-copy-btn {
    font-family: var(--gp-font);
    font-size: 0.8rem;
    padding: 4px 12px;
    background: var(--gp-border-light);
    border: 1px solid var(--gp-border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--gp-text-light);
    transition: all 0.2s;
}

.gp-copy-btn:hover {
    background: var(--gp-primary-50);
    color: var(--gp-primary);
}

.gp-copy-btn.copied {
    background: #D1FAE5;
    color: #065F46;
    border-color: #A7F3D0;
}

/* ── Canvas (for Minecraft Circle Generator) ───────────────────────── */

.gp-canvas-wrap {
    text-align: center;
    margin-bottom: 24px;
    overflow-x: auto;
}

.gp-canvas-wrap canvas {
    border: 2px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    max-width: 100%;
    height: auto;
}

/* ── Quote Block ───────────────────────────────────────────────────── */

.gp-quote {
    background: var(--gp-primary-50);
    border-left: 4px solid var(--gp-primary);
    padding: 20px 24px;
    border-radius: 0 var(--gp-radius-sm) var(--gp-radius-sm) 0;
    margin-bottom: 24px;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gp-text);
}

.gp-quote-source {
    font-style: normal;
    font-size: 0.85rem;
    color: var(--gp-text-light);
    margin-top: 8px;
    display: block;
}

/* ── Info / Stats Bar ──────────────────────────────────────────────── */

.gp-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.gp-stat {
    background: var(--gp-border-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gp-text-light);
}

.gp-stat strong {
    color: var(--gp-text);
}

/* ── Pokemon Type Badges ───────────────────────────────────────────── */

.gp-type-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.gp-type-normal { background: #A8A878; }
.gp-type-fire { background: #F08030; }
.gp-type-water { background: #6890F0; }
.gp-type-electric { background: #F8D030; color: #333; }
.gp-type-grass { background: #78C850; }
.gp-type-ice { background: #98D8D8; color: #333; }
.gp-type-fighting { background: #C03028; }
.gp-type-poison { background: #A040A0; }
.gp-type-ground { background: #E0C068; color: #333; }
.gp-type-flying { background: #A890F0; }
.gp-type-psychic { background: #F85888; }
.gp-type-bug { background: #A8B820; }
.gp-type-rock { background: #B8A038; }
.gp-type-ghost { background: #705898; }
.gp-type-dragon { background: #7038F8; }
.gp-type-dark { background: #705848; }
.gp-type-steel { background: #B8B8D0; color: #333; }
.gp-type-fairy { background: #EE99AC; }

/* ── Related Generators Section ────────────────────────────────────── */

.gp-related-generators {
    max-width: 720px;
    margin: 40px auto 0;
    font-family: var(--gp-font);
}

.gp-related-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gp-text);
    text-align: center;
    margin-bottom: 20px;
}

.gp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.gp-related-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--gp-white);
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    padding: 16px 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.gp-related-card:hover {
    border-color: var(--gp-primary);
    box-shadow: var(--gp-shadow);
    transform: translateY(-2px);
}

.gp-related-card-icon {
    font-size: 1.8rem;
}

.gp-related-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gp-text);
    text-align: center;
    line-height: 1.3;
}

/* ── Fusion / Split Display ────────────────────────────────────────── */

.gp-fusion-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gp-fusion-part {
    background: var(--gp-border-light);
    padding: 12px 20px;
    border-radius: var(--gp-radius-sm);
    text-align: center;
}

.gp-fusion-part-label {
    font-size: 0.75rem;
    color: var(--gp-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.gp-fusion-part-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gp-text);
}

.gp-fusion-plus {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gp-secondary);
}

.gp-fusion-equals {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gp-primary);
}

/* ── Pokemon Row Layout (info left, sprite right) ─────────────────── */

.gp-poke-row.gp-result {
    justify-content: space-between !important;
    text-align: left !important;
    padding: 20px;
    gap: 16px;
}

.gp-poke-row .gp-poke-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.gp-poke-row .gp-poke-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gp-primary-dark);
    line-height: 1.1;
}

.gp-poke-row .gp-poke-sprite {
    width: 110px;
    height: 110px;
    min-width: 110px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.gp-poke-row .gp-poke-id {
    font-size: 0.9rem;
    color: var(--gp-text-light);
}

.gp-poke-row .gp-poke-gen {
    font-size: 0.95rem;
    color: var(--gp-text-light);
}

.gp-poke-row .gp-poke-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gp-poke-row .gp-poke-sprite img {
    width: 90px;
    height: 90px;
    image-rendering: pixelated;
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .gp-generator-body {
        padding: 20px 16px;
    }

    .gp-generator-title {
        font-size: 1.5rem;
    }

    .gp-result-text {
        font-size: 1.2rem;
    }

    .gp-result-text.gp-result-large {
        font-size: 1.5rem;
    }

    .gp-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .gp-btn-block {
        width: 100%;
    }

    .gp-control-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gp-label {
        min-width: auto;
    }

    .gp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gp-fusion-display {
        flex-direction: column;
        gap: 8px;
    }

    .gp-stats {
        flex-direction: column;
        align-items: center;
    }

    .gp-quote {
        padding: 16px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gp-generator-title {
        font-size: 1.3rem;
    }

    .gp-generator-body {
        padding: 16px 12px;
        border-radius: var(--gp-radius-sm);
    }

    .gp-result {
        padding: 16px;
    }

    .gp-result-text {
        font-size: 1.1rem;
    }

    .gp-btn-group {
        flex-direction: column;
    }

    .gp-btn-group .gp-btn {
        width: 100%;
    }

    .gp-tags {
        justify-content: center;
    }
}

/* ── SEO Content Section ───────────────────────────────────────────── */

.gp-seo-content {
    max-width: 720px;
    margin: 40px auto;
    font-family: var(--gp-font);
    color: var(--gp-text);
    line-height: 1.8;
}

.gp-seo-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gp-primary-dark);
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gp-border-light);
}

.gp-seo-content h2:first-child {
    margin-top: 0;
}

.gp-seo-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gp-text);
    margin: 24px 0 8px;
}

.gp-seo-content p {
    margin: 0 0 16px;
    font-size: 1rem;
    color: var(--gp-text-light);
}

.gp-seo-content a {
    color: var(--gp-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.gp-seo-content a:hover {
    border-bottom-color: var(--gp-primary);
}

.gp-seo-content ul,
.gp-seo-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
    color: var(--gp-text-light);
}

.gp-seo-content li {
    margin-bottom: 6px;
    font-size: 1rem;
}

.gp-seo-content .gp-faq {
    background: var(--gp-white);
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius-sm);
    padding: 20px 24px;
    margin-bottom: 12px;
}

.gp-seo-content .gp-faq h3 {
    margin: 0 0 8px;
    color: var(--gp-primary-dark);
    font-size: 1rem;
}

.gp-seo-content .gp-faq p {
    margin: 0;
}

/* ── Print ─────────────────────────────────────────────────────────── */

@media print {
    .gp-btn, .gp-btn-group, .gp-related-generators, .gp-copy-btn {
        display: none !important;
    }
}
