/* Ship Tea Spill or Chill — Scoped Styles */

.shiptea-sc-wrapper {
    --st-ocean: #0077B6;
    --st-teal: #008080;
    --st-sunset: #FF6B35;
    --st-sand: #FFF1E6;
    --st-navy: #023E73;
    --st-white: #ffffff;
    --st-green: #2ECC71;
    --st-red: #E74C3C;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
    color: var(--st-navy);
}

.shiptea-sc-wrapper *, .shiptea-sc-wrapper *::before, .shiptea-sc-wrapper *::after {
    box-sizing: border-box;
}

/* Intro */
.shiptea-sc-intro {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--st-sand), var(--st-white));
    border-radius: 16px;
    border: 2px solid var(--st-teal);
}

.shiptea-sc-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.shiptea-sc-intro h2 {
    font-size: 1.8rem;
    color: var(--st-navy);
    margin: 0 0 0.75rem;
}

.shiptea-sc-subtitle {
    font-size: 1.05rem;
    color: #555;
    margin: 0 0 2rem;
    line-height: 1.5;
}

.shiptea-sc-start-btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--st-white);
    background: var(--st-sunset);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.shiptea-sc-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.35);
}

/* HUD */
.shiptea-sc-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--st-navy);
    color: var(--st-white);
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Game card */
.shiptea-sc-game-area {
    perspective: 1000px;
}

.shiptea-sc-card {
    position: relative;
    min-height: 340px;
}

.shiptea-sc-card-inner {
    position: relative;
    width: 100%;
    min-height: 340px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.shiptea-sc-card-inner.stsc-flipped {
    transform: rotateY(180deg);
}

.shiptea-sc-card-front, .shiptea-sc-card-back {
    position: absolute;
    width: 100%;
    min-height: 340px;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.shiptea-sc-card-front {
    background: var(--st-white);
    border: 2px solid var(--st-teal);
    box-shadow: 0 4px 20px rgba(0,128,128,0.1);
}

.shiptea-sc-card-back {
    background: var(--st-sand);
    border: 2px solid var(--st-ocean);
    transform: rotateY(180deg);
}

.shiptea-sc-headline-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--st-teal);
    margin-bottom: 1rem;
}

.shiptea-sc-headline {
    font-size: 1.35rem;
    line-height: 1.4;
    color: var(--st-navy);
    margin: 0 0 2rem;
    max-width: 520px;
}

.shiptea-sc-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.shiptea-sc-btn {
    flex: 1;
    padding: 16px 12px;
    font-size: 1.1rem;
    font-weight: 700;
    border: 3px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    font-family: inherit;
    line-height: 1.3;
}

.shiptea-sc-btn small {
    font-weight: 400;
    font-size: 0.8rem;
    opacity: 0.8;
}

.shiptea-sc-spill-btn {
    background: #FDEBD0;
    color: var(--st-sunset);
    border-color: var(--st-sunset);
}

.shiptea-sc-spill-btn:hover {
    transform: scale(1.05);
    background: #FADABC;
}

.shiptea-sc-chill-btn {
    background: #D6EAF8;
    color: var(--st-ocean);
    border-color: var(--st-ocean);
}

.shiptea-sc-chill-btn:hover {
    transform: scale(1.05);
    background: #BDD8F0;
}

/* Card back (reveal) */
.shiptea-sc-verdict {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.shiptea-sc-verdict.stsc-correct { color: var(--st-green); }
.shiptea-sc-verdict.stsc-wrong { color: var(--st-red); }

.shiptea-sc-truth {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--st-navy);
}

.shiptea-sc-explanation {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin: 0 0 1.5rem;
    max-width: 480px;
}

.shiptea-sc-next-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    background: var(--st-ocean);
    color: var(--st-white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: inherit;
}

.shiptea-sc-next-btn:hover {
    transform: translateY(-2px);
}

/* Confetti */
.shiptea-sc-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.shiptea-sc-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: stsc-confetti-fall 1.5s ease-out forwards;
}

@keyframes stsc-confetti-fall {
    0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* Teacup spill animation */
.shiptea-sc-spill-anim {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    pointer-events: none;
    z-index: 9999;
    animation: stsc-spill 1s ease-out forwards;
}

@keyframes stsc-spill {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(45deg) scale(1.3); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(90deg) scale(0.5); }
}

/* Results */
.shiptea-sc-result {
    animation: stsc-fadeIn 0.6s ease-out;
}

@keyframes stsc-fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.shiptea-sc-result-card {
    text-align: center;
    background: linear-gradient(135deg, var(--st-sand), var(--st-white));
    border-radius: 16px;
    padding: 2.5rem 2rem;
    border: 3px solid var(--st-teal);
    box-shadow: 0 8px 30px rgba(0,128,128,0.15);
}

.shiptea-sc-result-emoji { font-size: 4rem; margin-bottom: 0.5rem; }

.shiptea-sc-result-card h2 {
    font-size: 1.6rem;
    color: var(--st-navy);
    margin: 0 0 0.5rem;
}

.shiptea-sc-result-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--st-ocean);
    margin: 0 0 1rem;
}

.shiptea-sc-result-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 1.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Recap grid */
.shiptea-sc-result-recap {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

.shiptea-sc-recap-dot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.shiptea-sc-recap-dot.stsc-recap-correct { background: #D5F5E3; }
.shiptea-sc-recap-dot.stsc-recap-wrong { background: #FADBD8; }

/* Share */
.shiptea-sc-share { margin-bottom: 1.5rem; }
.shiptea-sc-share p { font-size: 0.9rem; color: #888; margin: 0 0 0.75rem; }

.shiptea-sc-share-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.shiptea-sc-share-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    color: var(--st-white);
    font-family: inherit;
}

.shiptea-sc-share-btn:hover { opacity: 0.85; }
.shiptea-sc-share-twitter { background: #1a1a1a; }
.shiptea-sc-share-facebook { background: #1877F2; }
.shiptea-sc-share-threads { background: #000000; }
.shiptea-sc-share-tiktok { background: #010101; }
.shiptea-sc-share-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.shiptea-sc-share-copy { background: var(--st-teal); }

/* Responsive */
@media (max-width: 768px) {
    .shiptea-sc-intro { padding: 2rem 1.25rem; }
    .shiptea-sc-intro h2 { font-size: 1.5rem; }
    .shiptea-sc-card-front, .shiptea-sc-card-back { padding: 1.5rem 1.25rem; }
    .shiptea-sc-headline { font-size: 1.15rem; }
    .shiptea-sc-result-card { padding: 2rem 1.25rem; }
}

@media (max-width: 400px) {
    .shiptea-sc-wrapper { padding: 0 0.5rem; }
    .shiptea-sc-buttons { flex-direction: column; }
    .shiptea-sc-btn { padding: 14px 12px; }
    .shiptea-sc-headline { font-size: 1.05rem; }
    .shiptea-sc-result-recap { grid-template-columns: repeat(5, 1fr); max-width: 240px; }
}
