:root {
    --bg: #0b0e14;
    --gold: #d4af37;
    --purple: #4b0082;
    --text: #f4f4f4;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Deck & Cards */
.deck-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    width: 90%;
    max-width: 1000px;
    padding: 20px;
    transition: 0.5s;
}

.card {
    aspect-ratio: 1/1.6;
    background: linear-gradient(135deg, var(--purple), #1a1a1a);
    border: 1px solid var(--gold);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
}

/* Shuffle Animation */
@keyframes shuffle {
    0% { transform: translate(0,0) rotate(0); }
    50% { transform: translate(var(--tx), var(--ty)) rotate(180deg); }
    100% { transform: translate(0,0) rotate(360deg); }
}

.shuffling { animation: shuffle 0.8s infinite linear; pointer-events: none; }

/* Modal & Staggered Animation */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--gold);
}

.prediction-grid { display: grid; gap: 10px; margin-top: 20px; }

.predict-item { 
    opacity: 0; 
    transform: translateY(20px); 
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-left: 3px solid var(--gold);
}

.modal.active .predict-item {
    animation: fadeInUp 0.5s forwards;
}

.modal.active .predict-item:nth-child(1) { animation-delay: 0.2s; }
.modal.active .predict-item:nth-child(2) { animation-delay: 0.4s; }
.modal.active .predict-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.reversed-visual { transform: rotate(180deg); }
.status-badge { padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; margin-bottom: 10px; display: inline-block; }
.status-upright { background: #2ecc71; }
.status-reversed { background: #e74c3c; }

footer {
    width: 100%;
    background: #080a0f; /* เข้มกว่าพื้นหลังหลักเล็กน้อยเพื่อให้ดูมีมิติ */
    padding: 40px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(214, 175, 55, 0.2); /* เส้นขอบทองจางๆ */
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 25px;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--gold); /* ใช้สีทองหลักที่เราตั้งไว้ */
    transition: all 0.3s ease;
    text-decoration: none;
}

/* เอฟเฟกต์เวลาเอาเมาส์ไปวาง (Hover) */
.social-icon:hover {
    transform: translateY(-5px);
    color: #fff;
    text-shadow: 0 0 10px rgba(214, 175, 55, 0.8);
}

/* สีเฉพาะตัวตอน Hover (Optional) */
.social-icon.line:hover { color: #06c755; }
.social-icon.youtube:hover { color: #ff0000; }
.social-icon.facebook:hover { color: #1877f2; }
.social-icon.tiktok:hover { color: #ff0050; }

.footer-info p {
    font-size: 0.8rem;
    color: #666;
    margin: 5px 0;
    letter-spacing: 1px;
}
/* CTA Section Layout */
.cta-section {
    width: 100%;
    padding: 80px 20px;
    background: radial-gradient(circle, rgba(75, 0, 130, 0.2) 0%, rgba(11, 14, 20, 1) 70%);
    text-align: center;
    border-top: 1px solid rgba(214, 175, 55, 0.1);
}

.cta-container h3 {
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.cta-container p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* ปุ่ม Line CTA ตัวใหญ่ */
.line-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #06c755; /* สีเขียว LINE */
    color: white;
    text-decoration: none;
    padding: 20px 45px;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(6, 199, 85, 0.3);
    border: 2px solid transparent;
}

.line-cta-btn i {
    font-size: 2rem;
}

.line-cta-btn:hover {
    transform: scale(1.08);
    background: #05b34c;
    box-shadow: 0 15px 40px rgba(6, 199, 85, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Badges เล็กๆ ด้านล่างปุ่ม */
.cta-badges {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.cta-badges span i {
    color: var(--gold);
    margin-right: 5px;
}

/* ปรับแต่งสำหรับมือถือ */
@media (max-width: 600px) {
    .cta-container h3 { font-size: 1.5rem; }
    .line-cta-btn { 
        width: 90%; 
        padding: 15px 25px; 
        font-size: 1.1rem; 
        justify-content: center;
    }
}