/* ==================== 🗺️ Basic global styles ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f5f7fb;
    color: #333;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 180px;
}

h1 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 25px;
    font-size: 24px;
}

/* ==================== 🧱 Display wall styles ==================== */
.workspace {
    min-height: 80vh !important;
    display: block !important;
}

.category-block {
    background: white;
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.category-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 8px;
}

.emoji-btn {
    font-size: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    padding: 6px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover:not(:disabled) {
    background: #e2e8f0;
    transform: scale(1.12) translateY(-2px);
}

.emoji-btn.selected {
    background: #3b82f6 !important;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35);
}

.emoji-btn:disabled {
    opacity: 0.12;
    cursor: not-allowed;
}

/* ==================== 🚀 Reaction capsule ==================== */
.floating-tracker {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 12px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
    backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.capsule-loader {
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #fbbf24;
    display: none;
    border-radius: 0 0 4px 4px;
    animation: pulseGlow 0.8s infinite alternate;
}

.tracker-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    font-family: monospace;
    border-right: 1px solid #334155;
    padding-right: 12px;
    white-space: nowrap;
}

.reaction-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 8px;
    flex-grow: 1;
}

.slot-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
}

.tracker-slot {
    font-size: 22px;
    background: #0f172a;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px dashed #475569;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.tracker-slot.active-a {
    border-style: solid;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.tracker-slot.active-b {
    border-style: solid;
    border-color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

.tracker-slot.cooking {
    opacity: 0.8;
    border-style: solid !important;
    border-color: #f59e0b !important;
    animation: slotPulse 0.4s infinite alternate linear;
}

.slot-controls {
    display: flex;
    background: #0f172a;
    border-radius: 8px;
    padding: 2px;
    border: 1px solid #334155;
    z-index: 3;
}

.ctrl-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 1px 4px;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    border-radius: 4px;
}

.ctrl-btn:hover {
    opacity: 1;
    transform: scale(1.2);
    background: #1e293b;
}

.track-sign {
    color: #475569;
    font-weight: bold;
    font-size: 16px;
    z-index: 2;
    margin-top: -16px;
}

.tracker-slot-res {
    font-size: 22px;
    background: #0f172a;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px;
    border: 2px dashed #475569;
    overflow: hidden !important;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    transition: all 0.2s;
}

.tracker-slot-res img {
    display: none;
    width: 85% !important;
    height: 85% !important;
    object-fit: contain !important;
    transform: scale(0);
    transform-origin: center;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10000;
}

.ghost-particle {
    position: absolute;
    font-size: 22px;
    z-index: 10;
    pointer-events: none;
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    top: 0;
}

.ghost-particle.run-left {
    display: flex;
    left: 0;
    animation: ghostCrashRight 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.ghost-particle.run-right {
    display: flex;
    left: calc(100% - 44px - 44px - 16px);
    animation: ghostCrashLeft 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-result-shaking {
    animation: microShake 0.1s infinite linear;
    border-color: #fbbf24 !important;
}

.animate-image-pop {
    display: block !important;
    animation: imagePopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.action-btns {
    display: flex;
    gap: 6px;
    border-left: 1px solid #334155;
    padding-left: 12px;
}

.tracker-btn {
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy {
    background: #4b5563;
    color: #9ca3af;
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-copy.ready {
    background: #10b981;
    color: white;
    opacity: 1;
    cursor: pointer;
    animation: buttonPulse 0.3s ease-out;
}

.btn-copy.ready:hover {
    background: #059669;
}

.btn-copy.copied {
    background: #3b82f6 !important;
}

/* 🔗 A striking orange in a pure sharing mode */
.btn-copy.share-ready {
    background: #f59e0b;
    color: white;
    opacity: 1;
    cursor: pointer;
    animation: buttonPulse 0.3s ease-out;
}

.btn-copy.share-ready:hover {
    background: #d97706;
}

.btn-clear {
    background: #ef4444;
    color: #ffffff;

    border: none;
    font-weight: 700;
    transition: all 0.2s ease;
}


.btn-clear:hover {
    background: #dc2626;

}

@media (max-width: 600px) {
    .floating-tracker {
        left: 12px;
        right: 12px;
        bottom: 16px;
        width: calc(100% - 24px);
        padding: 10px 12px;
        border-radius: 16px;
        gap: 8px;
    }

    .tracker-label {
        display: none;
    }

    .reaction-track {
        gap: 4px;
    }

    .tracker-slot,
    .tracker-slot-res,
    .ghost-particle {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px;
        border-radius: 10px;
    }

    .track-sign {
        margin-top: -14px;
    }

    .slot-controls {
        padding: 1px 2px;
    }

    .ctrl-btn {
        font-size: 10px;
        padding: 1px 3px;
    }

    .action-btns {
        padding-left: 6px;
        gap: 4px;
    }

    .tracker-btn {
        padding: 6px 8px;
        font-size: 10px;
        border-radius: 6px;
    }
}

/* 📐 CSS Definition of animation */
@keyframes slotPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 4px rgba(245, 158, 11, 0.2);
    }

    100% {
        transform: scale(1.08);
        box-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
    }
}

@keyframes ghostCrashRight {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    85% {
        transform: translateX(52px) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateX(52px) scale(0);
        opacity: 0;
    }
}

@keyframes ghostCrashLeft {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    85% {
        transform: translateX(-52px) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateX(-52px) scale(0);
        opacity: 0;
    }
}

@keyframes microShake {
    0% {
        translate: 0 0;
    }

    50% {
        translate: 1px -1px;
    }

    100% {
        translate: -1px 1px;
    }
}

@keyframes imagePopIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pulseGlow {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 8px #fbbf24;
    }
}

.emoji-hint-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px) scale(0.85);
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border: 1px solid #4b5563;
}

.emoji-hint-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.emoji-hint-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px) scale(1);
}

/* ==================== 🧠 Inspiration Card Section Styles ==================== */
.inspiration-container {
    max-width: 100%;
    margin: 0 auto 30px auto;
    padding: 0 10px;
}

.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.combo-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.combo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.combo-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.combo-emoji {
    font-size: 32px;
}

.combo-plus {
    font-size: 18px;
    color: #94a3b8;
    font-weight: bold;
}

.combo-title {
    font-size: 16px;

    font-weight: 700;

    margin: 4px 0;

    color: #1e293b;
}

.combo-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.combo-action-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.combo-action-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 📱 Perfectly optimised for mobile: no line breaks; instead, it becomes a horizontal scrollbar that glides smoothly from side to side */
@media (max-width: 768px) {
    .inspiration-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        gap: 12px;
    }

    .combo-card {
        flex: 0 0 75%;
        /* Show a corner of the next card to encourage the user to swipe */
        scroll-snap-align: start;
        padding: 16px;
    }
}


/* ==================== 📖 Inspiration Card Section Casing ==================== */

.inspiration-container {

    margin: 0 auto 30px auto;
    box-sizing: border-box;
}

.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}


.tutorial-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px 20px 100px 20px;
    margin-top: 30px;
    margin-bottom: 20px;
    box-sizing: border-box;

}




.tutorial-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 30px;
    box-sizing: border-box;
}


.tutorial-visual {
    flex: 0 0 240px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}


.tutorial-content {
    flex: 1;
}


.mock-reactor {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.mock-bubble {

    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;


    flex: 0 0 54px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;


    border-radius: 9999px !important;


    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;


    background: #ffffff !important;
    box-sizing: border-box !important;
}

.mock-plus {
    font-size: 18px;
    color: #60a5fa;
    font-weight: bold;
}

.mock-result {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #bfdbfe;
}

.tutorial-content h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.tutorial-steps {
    margin: 0;
    padding-left: 20px;
    font-weight: bold;
    color: #1e293b;
}

.tutorial-steps li {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
}

.tutorial-steps li:last-child {
    margin-bottom: 0;
}

.tutorial-steps li span {
    font-weight: normal;
}

/* 📱 Mobile responsiveness */
@media (max-width: 768px) {
    .inspiration-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 12px;
    }

    .combo-card {
        flex: 0 0 80%;
    }

    .tutorial-container {
        flex-direction: column;
        gap: 20px;
    }

    .tutorial-visual {
        width: 100%;
        flex: none;
    }
}

/* ==================== 🙋‍♂️ FAQ Perfect Alignment and Visual Consistency for Collapsible Sections ==================== */

/* ==================== 🙋‍♂️ 3. FAQ  ==================== */
.faq-section {
    width: 100%;
    max-width: 1000px;

    margin: 0 auto 120px auto;

    padding: 0;

    box-sizing: border-box;
}

.faq-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 20px 0;
    text-align: left;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}


.faq-item {
    background: #ffffff !important;

    border: 1px solid #e2e8f0 !important;

    border-radius: 12px !important;
    overflow: hidden;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* summary */
.faq-question {
    background: #ffffff !important;

    padding: 18px 24px !important;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    list-style: none !important;

    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    box-sizing: border-box;
    border-bottom: none;
}

.faq-question::-webkit-details-marker {
    display: none !important;

}

.faq-question:hover {
    background: #f8fafc !important;

}


.faq-question::after {
    content: '+' !important;
    font-size: 20px;
    color: #64748b;
    font-weight: bold;
    transition: transform 0.2s ease;
    display: inline-block;
    line-height: 1;
}


.faq-item[open] {
    border-color: #cbd5e1 !important;
}

.faq-item[open] .faq-question {
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
}


.faq-item[open] .faq-question::after {
    transform: rotate(45deg) !important;
    color: #0f172a;
}


.faq-answer {
    padding: 20px 24px !important;
    background: #ffffff !important;

    box-sizing: border-box;
}

.faq-answer p {
    margin: 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

/* ==================== 📱 4.  ==================== */
@media (max-width: 768px) {
    .inspiration-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        gap: 12px;
    }

    .combo-card {
        flex: 0 0 75%;
        scroll-snap-align: start;
        padding: 16px;
    }

    .tutorial-container {
        flex-direction: column;
        gap: 20px;
    }

    .tutorial-visual {
        width: 100%;
        flex: none;
    }

    .faq-section {
        margin-bottom: 140px;
    }

    .faq-question {
        padding: 16px 18px !important;
        font-size: 14px;
    }

    .faq-answer {
        padding: 16px 18px !important;
    }
}

/* ==================== 🗺️ Footer optimised for pixel-perfect alignment ==================== */
.site-footer {
    width: 100%;
    max-width: 1000px;
    margin: 60px auto 30px auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;

    box-sizing: border-box;
}

.footer-container {
    width: 100%;
    display: flex;
    justify-content: space-between;

    align-items: center;
    box-sizing: border-box;
}

.footer-copyright {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #3b82f6;

}


@media (max-width: 768px) {
    .site-footer {
        margin: 40px 15px 140px 15px;

        padding: 20px 16px;
        width: calc(100% - 30px);
    }

    .footer-container {
        flex-direction: column-reverse;

        gap: 16px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        gap: 20px;
    }
}
