/* 1. SECTION: General & Typography */
html {
    height: 100%;
}
body { 
    font-family: 'Kanit', sans-serif; 
    background-color: #f7f4f9;
    color: #3d3a4b;
    background-image: radial-gradient(circle at 1% 1%, rgba(250, 204, 21, 0.08), transparent 30%),
                      radial-gradient(circle at 99% 99%, rgba(168, 85, 247, 0.08), transparent 40%);
    background-attachment: fixed;
    
    /* Sticky Footer Properties */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.text-primary { color: #4c1d95; }
.text-gold { color: #d97706; }
.text-light { color: #3d3a4b; }
.text-muted { color: #6b7280; }

/* 2. SECTION: Main Content Area */
main {
    flex-grow: 1; /* Allows main content to expand and push footer down */
}

/* 3. SECTION: Layout Components */
.glass-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
.header {
    background: rgba(247, 244, 249, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 4. SECTION: Navigation */
.header-link { 
    color: #4b5563;
    transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    padding-bottom: 0.25rem;
    border-bottom-width: 2px;
    border-color: transparent;
}
.header-link:hover {
    color: #4c1d95;
    border-color: #4c1d95;
}
.active-link { 
    color: #4c1d95;
    border-color: #4c1d95;
}

/* 5. SECTION: Buttons */
.btn-register {
    background-color: #6d28d9;
    color: #ffffff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease-in-out;
    box-shadow: 0 10px 15px -3px rgba(109, 40, 217, 0.3), 0 4px 6px -2px rgba(109, 40, 217, 0.3);
}
.btn-register:hover {
    background-color: #7c3aed;
}
.btn-premium {
    border: none; 
    cursor: pointer; 
    text-decoration: none; 
    display: inline-flex;
    align-items: center; 
    justify-content: center; 
    gap: 0.75rem; 
    font-size: 1.125rem;
    font-weight: 700; 
    padding: 1rem 2.5rem; 
    border-radius: 50px; 
    color: #4c1d95;
    background: linear-gradient(45deg, #fde047, #facc15);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4), 0 4px 0 #ca8a04;
    transition: all 0.15s ease-in-out;
}
.btn-premium:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.6), 0 6px 0 #ca8a04; 
}
.btn-premium:active { 
    transform: translateY(1px); 
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.4), 0 2px 0 #ca8a04; 
}
.social-btn { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    background-color: #f3f4f6;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
}
.social-btn:hover { 
    background-color: #e5e7eb; 
}
.btn-coin {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(252, 211, 77, 0.5);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
    padding: 0.375rem 0.75rem;
    transition: background-color 0.15s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-coin:hover { 
    background-color: #fefce8; 
}

/* 6. SECTION: Utilities */
/* .page { display: none; } */
.hidden-element { 
    display: none; 
}

/* 7. SECTION: Pricing Cards Layout (Responsive) */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.pricing-grid > .glass-card {
    height: 100%;
}
.pricing-grid > .glass-card ul {
    flex-grow: 1;
}

@media (min-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr 1.1fr 1fr;
    }
}

/* 8. SECTION: Tarot Page Layout */
.tarot-deck-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    max-width: 900px;
    margin: 1rem auto;
    perspective: 1000px;
}
.tarot-card-back {
    width: 70px;
    height: 120px;
    background-size: cover;
    background-position: center;
    border: 2px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    transform: rotateY(0deg);
}
.tarot-card-back:hover {
    transform: translateY(-10px) scale(1.1);
    z-index: 100;
}
.tarot-card-back.selected {
    transform: rotateY(180deg) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s;
}

.selected-card-slots {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 1rem; min-height: 140px; margin-bottom: 2rem;
    max-width: 900px; margin-left: auto; margin-right: auto;
}
.card-slot {
    width: 70px; height: 120px;
    border: 2px dashed #a78bfa; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: #a78bfa; font-size: 0.7rem; padding: 0.25rem;
    position: relative;
}
.card-slot img {
    position: absolute; width: 100%; height: 100%;
    border-radius: 8px; opacity: 0;
    transform: scale(0.5); transition: all 0.5s ease-out;
}
.card-slot img.placed { opacity: 1; transform: scale(1); }

/* 9. SECTION: SVG Icon Coloring */
.icon-svg {
    background-color: currentColor; /* รับสีมาจาก class 'text-*' ของ parent */
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    display: inline-block;
}

/* 10. SECTION: Liked Button State */
.social-btn.liked {
    background-color: #ec4899; /* Pink background */
    color: #ffffff; /* White text and icon */
}
.social-btn.liked:hover {
    background-color: #f472b6;
}

/* 11. SECTION: Share Dropdown Menu */
.share-container {
    position: relative;
}
.share-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    width: 160px;
    z-index: 20;
    display: none;
    padding: 0.5rem;
    animation: fadeIn 0.15s ease-out;
}
.share-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
}
.share-dropdown a:hover {
    background-color: #f3f4f6;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 12. SECTION: Formatted Content for AI Results */
.formatted-content h1,
.formatted-content h2,
.formatted-content h3,
.formatted-content h4 {
    font-weight: 700;
    color: #4c1d95; /* text-primary */
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.formatted-content h1 { font-size: 1.875rem; } /* text-3xl */
.formatted-content h2 { font-size: 1.5rem; }   /* text-2xl */
.formatted-content h3 { font-size: 1.25rem; }  /* text-xl */

.formatted-content p {
    margin-bottom: 1em;
    line-height: 1.75;
}

.formatted-content strong,
.formatted-content b {
    font-weight: 600;
    color: #3d3a4b; /* text-light */
}

.formatted-content ul,
.formatted-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1em;
    list-style-position: outside;
}

.formatted-content ul {
    list-style-type: disc;
}

.formatted-content ol {
    list-style-type: decimal;
}

.formatted-content li {
    margin-bottom: 0.5em;
}

.formatted-content hr {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 2em 0;
}

/* 13. SECTION: Payment Verification Page */

main.site-main-payment-verification {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the content */
    align-items: center;     /* Horizontally centers the content */
    padding: 2rem 1rem;
}

.payment-verification-content {
    width: 100%;
    max-width: 600px;
}

.payment-verification-content .glass-card {
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    margin: 0 auto 30px auto;
    border: 5px solid rgba(0, 0, 0, 0.08);
    border-top-color: #d97706; /* .text-gold color */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.verification-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #3d3a4b; /* text-light */
    margin: 0 0 10px 0;
}

/* Success state styling (no changes needed here) */
#payment-verification-status h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 12px;
}

#payment-verification-status a.button {
    border: none; cursor: pointer; text-decoration: none; 
    display: inline-flex; align-items: center; justify-content: center; 
    margin-top: 2rem; gap: 0.75rem; font-size: 1rem;
    font-weight: 700; padding: 0.8rem 2rem; border-radius: 50px; 
    color: #4c1d95;
    background: linear-gradient(45deg, #fde047, #facc15);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4), 0 4px 0 #ca8a04;
    transition: all 0.15s ease-in-out;
}

#payment-verification-status a.button:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.6), 0 6px 0 #ca8a04; 
}