/* ============================
   ZENER APP CONTAINER
============================ */

#zener-app {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
	/* ⭐ Make footer stick to bottom */
    display: flex;
    flex-direction: column;
    min-height: 520px; 
}
@media (min-width: 768px) {
    #zener-app {
        max-width: 700px; /* enough for 5 buttons */
    }
}


/* Phase containers */
.zener-phase {
    text-align: center;
    animation: fadeIn 0.4s ease;
}

/* ============================
   ANIMATIONS
============================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

/* ============================
   TYPOGRAPHY
============================ */

#zener-app h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

#zener-app p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

/* ============================
   BUTTONS
============================ */

#zener-app button {
    background: #333;
    color: white;
    border: none;
    padding: 0.8rem 1.4rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin: 0.5rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

#zener-app button:hover {
    background: #000;
}

#zener-app button:active {
    transform: scale(0.97);
}

/* ============================
   MYSTERY CARD
============================ */

#mystery-wrapper {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.mystery-card {
    width: 120px;
    height: 150px;
    background: #f7f7f7;
    border: 2px solid #ddd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #888;
    opacity: 1; /* stays visible */
    transition: opacity 0.4s ease;
}

/* Only animate when JS explicitly adds this class */
.mystery-card.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.mystery-card.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ============================
   ZENER CARDS
============================ */

#card-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.zener-card {
    width: 100px;
    height: 120px;
    background: #fafafa;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zener-card {
    background: #fafafa !important;
    color: inherit !important;
}

.zener-card:hover {
    background: #f0f0f0;
    border-color: #bbb;
    transform: translateY(-3px);
}

.zener-card:active {
    transform: scale(0.96);
}

/* Fade other cards when one is selected */
.zener-card.fade-other {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Highlight selected card */
.zener-card.selected {
    transform: scale(1.05);
    border-color: #333;
    background: #fff;
    z-index: 2;
}


.zener-card svg {
    width: 85%;
    height: 85%;
    stroke: #000; /* pure black like real Zener cards */
    stroke-width: 10; /* overridden by SVG, but acts as fallback */
    fill: none;
    pointer-events: none;
}


/* ============================
   RESULTS
============================ */

#results-output p {
    margin: 0.4rem 0;
    font-size: 1.1rem;
}

#results-output strong {
    color: #222;
}


.stat {
    border-bottom: 1px dotted #666;
    cursor: help;
}

/* Mobile popup bubble */
.tooltip-bubble {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    background: #333;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Only show tap behaviour on touch devices */
@media (hover: none) and (pointer: coarse) {
    .stat {
        cursor: pointer;
    }
}


/* ============================
   RESPONSIVE
============================ */

@media (max-width: 480px) {
    .zener-card {
        width: 80px;
        height: 100px;
        font-size: 0.9rem;
    }

    #zener-app {
        padding: 1.2rem;
    }
}



#zener-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
    font-size: 0.85rem;
    text-align: center;
    color: #666;
}

#zener-footer a {
    color: #0077cc;
    text-decoration: none;
}

#zener-footer a:hover {
    text-decoration: underline;
}

#zener-footer .version {
    margin-left: 0.5rem;
    color: #999;
}
