@charset "UTF-8";

/* ==========================================================================
   Page: accept_events.html (Was test5.html)
   Theme: Positive, Sparkle, Clear Sky, Gold
   ========================================================================== */

/* --- Variables --- */
:root {
    --color-lucky-sky: #E0F7FA;
    --color-lucky-blue: #29B6F6;
    --color-lucky-gold: #FFD700;
    --color-lucky-accent: #FF6F00;
    --color-text-main: #37474F;
    --color-white: #ffffff;
    
    --shadow-soft: 0 10px 30px rgba(41, 182, 246, 0.15);
    --shadow-card: 0 4px 15px rgba(0,0,0,0.05);
    
    --gradient-hero: linear-gradient(135deg, #E0F7FA 0%, #FFFFFF 100%);
    --gradient-gold: linear-gradient(45deg, #FFD700, #FFECB3);
}

/* --- Hero Section --- */
.lucky-hero {
    position: relative;
    padding: 80px 20px;
    text-align: center;
    background: var(--gradient-hero);
    border-radius: 20px;
    margin-bottom: 60px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.lucky-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--color-lucky-gold) 0%, transparent 70%);
    opacity: 0.2;
    filter: blur(40px);
}

.lucky-hero .sub-title {
    display: block;
    font-size: 1.2rem;
    color: var(--color-lucky-blue);
    margin-bottom: 15px;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.lucky-hero h1 {
    font-size: 2.8rem;
    line-height: 1.4;
    color: var(--color-text-main);
    margin: 0;
    text-shadow: 2px 2px 0px white;
}

/* --- Content Blocks --- */
.content-block {
    margin-bottom: 60px;
    position: relative;
}

.intro-block {
    text-align: center;
}

.lead-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #546E7A;
    margin-bottom: 20px;
}

.warm-message {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-lucky-accent);
    background: linear-gradient(to right, rgba(255, 236, 179, 0.5), rgba(255, 255, 255, 0));
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
}

/* --- Example Block --- */
.example-block h2 {
    font-size: 1.5rem;
    color: var(--color-lucky-blue);
    border-bottom: 3px solid var(--color-lucky-gold);
    padding-bottom: 10px;
    margin-bottom: 30px;
    display: inline-block;
}

.example-block .emphasis-text {
    font-weight: bold;
    color: #D84315;
    background: #FFF3E0;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #FF5722;
}

/* Thinking Shift Area */
.thinking-shift {
    margin-top: 40px;
    background: #FAFAFA;
    padding: 30px;
    border-radius: 15px;
    border: 2px dashed #B0BEC5;
    text-align: center;
}

.thought-bubble {
    display: inline-block;
    background: var(--color-white);
    padding: 20px 30px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-lucky-blue);
    position: relative;
}

.thought-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px 15px 0;
    border-style: solid;
    border-color: var(--color-white) transparent;
}

.thought-bubble i {
    color: var(--color-lucky-gold);
    margin-right: 10px;
    font-size: 1.5rem;
}

/* --- Choice Block (Rotating Cards) --- */
.choice-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
    perspective: 1000px; /* Enable 3D space */
}

/* Wrapper holds the card */
.choice-wrapper {
    flex: 1;
    min-width: 250px;
    height: 180px; /* Fixed height for flip */
    cursor: pointer;
    transition: transform 0.2s;
}

/* The Card itself (rotates) */
.choice-card {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    animation: autoFlip 6s infinite ease-in-out;
}

/* Faces of the card */
.choice-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Front Face Styles */
.choice-front {
    z-index: 2;
}

.choice-wrapper.negative .choice-front,
.choice-wrapper.negative .choice-back {
    background: #ECEFF1;
    border: 1px solid #CFD8DC;
    color: #78909C;
}

.choice-wrapper.positive .choice-front,
.choice-wrapper.positive .choice-back {
    background: white;
    border: 2px solid var(--color-lucky-gold);
    color: var(--color-lucky-accent);
}
.choice-wrapper.positive .choice-front {
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

/* Back Face Styles */
.choice-back {
    transform: rotateY(180deg);
}

.choice-wrapper.positive .choice-back {
    background: #FFFDE7; /* Lighter gold */
}

.choice-card .label {
    display: block;
    font-size: 0.9rem;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: 2px;
}
.choice-wrapper.positive .label { color: var(--color-lucky-gold); }

.choice-card .text {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Flip Animation */
@keyframes autoFlip {
    0%, 45% { transform: rotateY(0deg); }
    50%, 95% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); } /* Full rotation to reset */
}

/* Pause animation on hover */
.choice-wrapper:hover .choice-card {
    animation-play-state: paused;
}

/* Arrow between cards */
.arrow-icon {
    font-size: 2rem;
    color: #B0BEC5;
}

.choice-result {
    text-align: center;
    margin-top: 30px;
    font-weight: 500;
}

/* Click Effect */
.choice-wrapper.positive.celebrating {
    transform: scale(1.1);
}


/* --- Core Message Block --- */
.core-message-block {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--color-lucky-blue);
}

.sparkle-title {
    text-align: center;
    color: var(--color-lucky-blue);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.sparkle-title i {
    color: var(--color-lucky-gold);
    animation: spin 3s infinite linear;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.magic-words blockquote {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-lucky-blue);
    margin: 30px 0;
    padding: 20px;
    border-left: none;
    background: #E1F5FE;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.magic-words blockquote::before,
.magic-words blockquote::after {
    color: #B3E5FC;
    font-size: 3rem;
    font-family: serif;
    position: absolute;
}
.magic-words blockquote::before { content: '“'; top: 0; left: 10px; }
.magic-words blockquote::after { content: '”'; bottom: -20px; right: 10px; }

.key-secret {
    background: var(--gradient-gold);
    padding: 40px;
    border-radius: 999px 20px 999px 20px; /* playful shape */
    text-align: center;
    margin-top: 50px;
    color: #5D4037;
    position: relative;
    overflow: hidden;
}

.key-secret .secret-label {
    background: #D84315;
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.key-secret h3 {
    margin: 10px 0 0;
    font-size: 1.5rem;
    line-height: 1.5;
}

/* --- Lucky Thinking Block --- */
.lucky-thinking-block {
    padding-top: 40px;
}

.lucky-header h2 {
    font-size: 2.2rem;
    text-align: center;
    background: -webkit-linear-gradient(45deg, #FF6F00, #FFCA28);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
}

.highlight {
    background: linear-gradient(transparent 70%, #FFF59D 70%);
    font-weight: bold;
}

.point-box {
    background: var(--color-lucky-blue);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    margin: 30px auto;
    max-width: 500px;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(41, 182, 246, 0.3);
    transform: rotate(-2deg);
}

.point-box strong {
    font-size: 1.5rem;
    color: #FFFde7;
}

/* --- Conclusion Block --- */
.conclusion-block {
    text-align: center;
}

.final-message {
    margin: 60px 0;
    padding: 40px;
    background-image: 
        radial-gradient(circle at top left, #FFECB3 10%, transparent 10%),
        radial-gradient(circle at bottom right, #B3E5FC 10%, transparent 10%);
    background-size: 20px 20px;
    display: inline-block;
    width: 100%;
}

.final-message h2 {
    font-size: 1.8rem;
    color: var(--color-lucky-blue);
    margin-bottom: 20px;
}

.final-message .decide {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-lucky-accent);
    letter-spacing: 0.05em;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    5% { transform: scale(1.05); }
    10% { transform: scale(1); }
    15% { transform: scale(1.05); }
    20% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Quote Card Redesign */
.quote-card {
    position: relative;
    border: 2px solid var(--color-lucky-gold);
    padding: 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFDE7 100%);
    display: inline-block;
    max-width: 700px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
    overflow: hidden;
}

.quote-card::before {
    content: '“';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 8rem;
    font-family: serif;
    color: var(--color-lucky-gold);
    opacity: 0.2;
    z-index: 0;
}

.quote-card p {
    position: relative;
    z-index: 1;
    font-family: serif;
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.8;
    color: #37474F;
    margin-bottom: 20px;
    font-weight: 700;
}

.quote-card cite {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--color-lucky-accent);
    font-weight: bold;
    font-style: normal;
    display: block;
    text-align: right;
}
.quote-card cite::before {
    content: '— ';
}

/* --- Background Decoration --- */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    background: radial-gradient(white, rgba(255,255,255,0));
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 768px) {
    .lucky-hero h1 { font-size: 2rem; }
    .magic-words blockquote { font-size: 1.1rem; }
    .point-box { transform: rotate(0deg); width: 100%; }
    .final-message .decide { font-size: 1.8rem; }
}

/* --- Interactive Elements (Brush-up) --- */

/* Cursor Sparkle */
.cursor-sparkle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transition: transform 1s ease, opacity 1s ease;
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 10000;
    opacity: 1;
    border-radius: 2px;
}

.confetti.pop {
    transform: translate(var(--tx), var(--ty)) rotate(720deg);
    opacity: 0;
    transition: transform 1.5s ease-out, opacity 1.5s ease-in;
}

/* --- Lucky Practice Button (Sidebar) --- */
.lucky-practice-btn {
    background: linear-gradient(45deg, #FF6F00, #FFCA28);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 111, 0, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
    outline: none;
}

.lucky-practice-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(255, 111, 0, 0.3);
}

.lucky-practice-btn i {
    margin-right: 8px;
}

/* Floating Lucky Text */
.floating-lucky {
    position: absolute;
    font-weight: 900;
    color: #FFD700;
    pointer-events: none;
    z-index: 100;
    text-shadow: 2px 2px 0px white, -1px -1px 0 rgba(0,0,0,0.1);
    white-space: nowrap;
    animation: floatUp 1.5s ease-out forwards;
}

.floating-lucky.mega {
    font-size: 2.5rem !important;
    color: #FF1744; /* Red accent for mega */
    text-shadow: 3px 3px 0px #FFD700;
    animation: floatUpMega 2s ease-out forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { transform: translateY(-20px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

@keyframes floatUpMega {
    0% { transform: translateY(0) scale(0.5) rotate(-10deg); opacity: 0; }
    10% { transform: translateY(-30px) scale(1.5) rotate(10deg); opacity: 1; }
    100% { transform: translateY(-150px) scale(2) rotate(0deg); opacity: 0; }
}

/* --- Dual Magnet Stage --- */
.magnet-stage {
    position: relative;
    width: 100%;
    height: 200px;
    background: #FAFAFA;
    border: 1px solid #EEE;
    border-radius: 15px;
    margin: 40px 0;
    overflow: hidden;
    cursor: col-resize;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

.magnet-human {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 60px;
    color: #37474F;
    transition: transform 0.1s, color 0.2s;
    z-index: 5;
    transform-origin: bottom center;
}

.magnet-label {
    position: absolute;
    top: 10px;
    font-weight: bold;
    font-size: 1.5rem;
    opacity: 0.7;
}
.magnet-label.left { left: 20px; color: #546E7A; }
.magnet-label.right { right: 20px; color: #FFD700; }

.magnet-instruction {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: #B0BEC5;
}

/* Attracted Words */
.attracted-word {
    position: absolute;
    font-weight: bold;
    font-size: 2rem;
    opacity: 0;
    transition: transform 3s ease-in, opacity 3s;
    white-space: nowrap;
}

.word-good { color: #FF8F00; text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
.word-bad { color: #455A64; text-shadow: 0 0 5px rgba(0, 0, 0, 0.1); }

/* --- Sidebar Sticky Fix --- */
/* Reset overflow on ancestors to allow sticky to work relative to viewport */
body, .page-wrapper {
    overflow: visible !important;
    overflow-x: clip !important; /* Modern browsers: prevent horiz scroll without breaking sticky */
}

/* Fallback for older browsers if clip not supported, though less likely issue on modern */
@supports not (overflow-x: clip) {
    body, .page-wrapper {
        overflow-x: hidden !important; /* Might break sticky in some cases, but necessary for layout safety */
    }
}
/* Crucially ensure page-wrapper is visible for sticky */
.page-wrapper {
    overflow: visible !important;
}

.layout-container {
    overflow: visible; /* Ensure content flows */
}

.sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    align-self: start; /* Crucial for Grid sticky */
    z-index: 10;
    height: fit-content;
}
