/* Valentine Tarot - Main Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --burgundy: #722F37;
    --cream: #FFFEF5;
    --cream-dark: #F5F0E1;
    --envelope-cream: #F8F4E8;
    --gold: #C9A227;
}

html, body {
    overflow: hidden;
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
}

body {
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    /* Fallback solid color for older browsers */
    background-color: #FFFEF5;
    /* Webkit prefix for older iOS Safari */
    background: -webkit-repeating-linear-gradient(
        0deg,
        #FFFEF5 0px,
        #FFFEF5 8px,
        #F5F0E1 8px,
        #F5F0E1 10px
    );
    /* Standard syntax with explicit colors for iOS compatibility */
    background: repeating-linear-gradient(
        90deg,
        #FFFEF5 0px,
        #FFFEF5 8px,
        #F5F0E1 8px,
        #F5F0E1 10px
    );
    background-attachment: scroll;
    -webkit-background-size: 10px 100%;
    background-size: 10px 100%;
    min-height: 100vh;
    color: var(--burgundy);
}

/* ==================== LANDING PAGE ==================== */
.landing-heading {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--burgundy);
    text-align: center;
    line-height: 1.3;
    max-width: 350px;
    padding: 0 20px;
    margin-top: 5vh;
    margin-bottom: 0;
    padding-bottom: 2.5rem;
    /* Hidden initially for loading */
    opacity: 0;
    transform: translateY(-40px);
}

/* Epic reveal animation for header */
@keyframes headerReveal {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    50% {
        opacity: 1;
        transform: translateY(8px) scale(1.03);
    }
    75% {
        transform: translateY(-3px) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.landing-heading.revealed {
    animation: headerReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.strikethrough-word {
    position: relative;
    display: inline-block;
}

.strikethrough-word .mistake {
    text-decoration: line-through;
    text-decoration-color: #1a1a1a;
    text-decoration-thickness: 2px;
}

.strikethrough-word .valentine {
    position: absolute;
    left: 50%;
    top: 85%;
    transform: translateX(-50%) rotate(-8deg);
    white-space: nowrap;
    font-family: 'Caveat', cursive;
    font-size: 1em;
    font-weight: 400;
    color: #1a1a1a;
}

.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

.landing-page.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Animation for header moving to top-left corner */
.landing-heading.revealed {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                margin 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                padding 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.landing-heading.fade-out {
    animation: none !important;
    opacity: 0 !important;
    transition: opacity 0.6s ease !important;
}

/* Mini header that fades in at center of ellipse */
.mini-header {
    position: fixed;
    top: calc(50% - 25px);
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--burgundy);
    line-height: 1.3;
    text-align: center;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.mini-header.visible {
    animation: headerFadeIn 0.8s ease-out forwards, headerGlow 3s ease-in-out 0.8s infinite;
}

@keyframes headerFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes headerGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(114, 47, 55, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(114, 47, 55, 0.6), 0 0 30px rgba(114, 47, 55, 0.3);
    }
}

/* Floating animation for spread cards */
@keyframes cardFloat {
    0%, 100% {
        transform: var(--card-rotation) translateY(0px);
    }
    50% {
        transform: var(--card-rotation) translateY(-4px);
    }
}

.card-container.spread.floating {
    transform: var(--card-rotation) translateY(0px);
    animation: cardFloat 3s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

.mini-header .strikethrough-word {
    position: relative;
    display: inline-block;
}

.mini-header .mistake {
    text-decoration: line-through;
    text-decoration-color: #1a1a1a;
    text-decoration-thickness: 1px;
}

.mini-header .valentine {
    position: absolute;
    left: 50%;
    top: 85%;
    transform: translateX(-50%) rotate(-8deg);
    white-space: nowrap;
    font-family: 'Caveat', cursive;
    font-size: 1em;
    font-weight: 400;
    color: #1a1a1a;
}

/* Animation for spinning card hint fade */
.spinning-card-container .card-click-hint {
    transition: opacity 0.3s ease;
}

/* Ensure spinning card stays above the stack during animation */
.spinning-card-container {
    z-index: 100;
}

/* Card grid - ready state */
.card-grid.stacked {
    /* Cards are stacked and ready */
}

/* Spinning Card Container - Diamond shape spinning on corner */
.spinning-card-container {
    position: relative;
    top: -20px;
    width: 180px;
    height: 321px;
    perspective: 1500px;
    cursor: pointer;
    transform-style: preserve-3d;
    margin-top: auto;
    margin-bottom: auto;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
}

.spinning-card-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: center center;
    /* Spin around Y-axis (vertical) */
    animation: spinOnY 3s linear infinite;
    transition: transform 0.5s ease;
}

.spinning-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: center center;
    /* Tilt so diagonal (top-left to bottom-right) becomes vertical
       angle = arctan(width/height) = arctan(180/321) ≈ 29.3 degrees */
    transform: rotate(-29.3deg);
    transition: transform 0.5s ease;
}

.spinning-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 30px 60px rgba(114, 47, 55, 0.5),
        0 15px 40px rgba(0, 0, 0, 0.4);
}

.spinning-card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spinning-card-back {
    transform: rotateY(180deg);
}

@keyframes spinOnY {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.spinning-card-container:hover {
    transform: scale(1.05);
}

/* Sparkle particles - floating stars */
.spinning-card-container .sparkle-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 215, 0, 0.8) 30%,
        transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

@keyframes sparkleRise {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translate(calc(var(--move-x) * 0.2), calc(var(--move-y) * 0.2)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--move-x), var(--move-y)) scale(0.5);
    }
}

/* Click hint on card */
.card-click-hint {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--burgundy);
    opacity: 0.8;
    white-space: nowrap;
}

.card-click-hint.loading-state {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Ready state animation for hint */
@keyframes hintReveal {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    100% {
        opacity: 0.9;
        transform: translateX(-50%) translateY(0);
    }
}

.card-click-hint.ready-state {
    animation: hintReveal 0.6s ease forwards, pulse 2s ease-in-out 0.6s infinite;
}

/* Card glow and scale effect when ready */
@keyframes cardReadyReveal {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(201, 162, 39, 0));
    }
    30% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 30px rgba(201, 162, 39, 0.8));
    }
    60% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 20px rgba(201, 162, 39, 0.5));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.3));
    }
}

.spinning-card-container.ready-glow {
    animation: cardReadyReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Persistent subtle glow after ready */
.spinning-card-container.ready-glow::after {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: subtleGlow 3s ease-in-out infinite;
}

@keyframes subtleGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Landing Instruction */
.landing-instruction {
    display: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Brand on Landing */
/* Total Counter (Fixed - visible on all pages) */
.total-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(114, 47, 55, 0.08);
    border: 1px solid rgba(114, 47, 55, 0.15);
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    z-index: 2001;
}

.total-counter.show {
    opacity: 1;
    pointer-events: auto;
}

.total-counter-icon {
    width: 18px;
    height: 18px;
    color: var(--burgundy);
    opacity: 0.6;
}

#totalPickCount {
    font-family: 'Prompt', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--burgundy);
    opacity: 0.7;
}

.total-counter.show {
    cursor: pointer;
}

.total-counter.show:hover {
    background: rgba(114, 47, 55, 0.15);
}

/* Ranking Panel - Minimal Foggy Glass */
.ranking-panel {
    position: fixed;
    top: 55px;
    right: -220px;
    width: 200px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 2003;
    transition: right 0.3s ease;
    overflow: hidden;
}

.ranking-panel.show {
    right: 0;
}

.ranking-header {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(139, 69, 79, 0.1);
}

.ranking-title {
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--burgundy);
    opacity: 0.8;
}

.ranking-list {
    padding: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.ranking-loading {
    text-align: center;
    padding: 15px;
    color: var(--burgundy);
    opacity: 0.5;
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    margin-bottom: 4px;
    border-radius: 8px;
    transition: background 0.2s ease;
    min-height: 40px;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.ranking-trophy {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ranking-card-image {
    width: 24px;
    height: 34px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.ranking-card-name {
    font-family: 'Prompt', sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    color: var(--burgundy);
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-count {
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--burgundy);
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
}

.ranking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 2002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ranking-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Mute Button */
.mute-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(114, 47, 55, 0.1);
    border: 1px solid rgba(114, 47, 55, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mute-btn:hover {
    background: rgba(114, 47, 55, 0.2);
    transform: scale(1.05);
}

.mute-btn:active {
    transform: scale(0.95);
}

.mute-btn svg {
    width: 20px;
    height: 20px;
    color: var(--burgundy);
    opacity: 0.7;
}

.mute-btn .hidden {
    display: none;
}

.mute-btn .sound-wave {
    opacity: 0.6;
}

/* Sound Wave Indicator */
.sound-indicator {
    position: fixed;
    bottom: 26px;
    right: 70px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9998;
}

.sound-indicator.playing {
    opacity: 1;
}

.sound-indicator .bar {
    width: 3px;
    background: var(--burgundy);
    border-radius: 2px;
    opacity: 0.6;
}

.sound-indicator .bar:nth-child(1) {
    height: 6px;
    animation: soundBar1 0.6s ease-in-out infinite;
}

.sound-indicator .bar:nth-child(2) {
    height: 12px;
    animation: soundBar2 0.6s ease-in-out infinite 0.1s;
}

.sound-indicator .bar:nth-child(3) {
    height: 8px;
    animation: soundBar3 0.6s ease-in-out infinite 0.2s;
}

.sound-indicator .bar:nth-child(4) {
    height: 14px;
    animation: soundBar4 0.6s ease-in-out infinite 0.15s;
}

@keyframes soundBar1 {
    0%, 100% { height: 6px; }
    50% { height: 14px; }
}

@keyframes soundBar2 {
    0%, 100% { height: 12px; }
    50% { height: 6px; }
}

@keyframes soundBar3 {
    0%, 100% { height: 8px; }
    50% { height: 16px; }
}

@keyframes soundBar4 {
    0%, 100% { height: 14px; }
    50% { height: 8px; }
}

/* Facebook Connect Button */
.facebook-connect-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1877F2;
    border: none;
    border-radius: 24px;
    color: white;
    font-family: 'Prompt', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
    opacity: 0;
    transform: translateY(-10px);
}

.facebook-connect-btn.show {
    opacity: 1;
    transform: translateY(0);
}

.facebook-connect-btn:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.facebook-connect-btn:active {
    transform: translateY(0);
}

.facebook-connect-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.facebook-connect-btn.connected {
    background: linear-gradient(135deg, #1877F2, #42b883);
}

.facebook-connect-btn.connected::before {
    content: '\2713';
    margin-right: 4px;
    font-size: 0.9rem;
}

.landing-brand {
    position: absolute;
    bottom: 30px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    letter-spacing: 3px;
    color: var(--burgundy);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.landing-brand.revealed {
    opacity: 1;
}

/* Version tag - bottom right corner */
.version-tag {
    position: fixed;
    bottom: 3px;
    right: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.55rem;
    color: rgba(114, 47, 55, 0.25);
    letter-spacing: 0.5px;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--burgundy);
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    opacity: 1;
    transform: scale(1.1);
}

.social-icons svg {
    width: 20px;
    height: 20px;
}

/* Footer social icons */
.footer-social {
    margin-bottom: 8px;
}

.footer-social svg {
    width: 22px;
    height: 22px;
}

/* ==================== MAIN PAGE ==================== */
.main-page {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease 0.5s, visibility 0.8s ease 0.5s;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.main-page.visible {
    opacity: 1;
    visibility: visible;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header - Hidden */
header {
    display: none;
}

/* Card Grid - Circular Layout */
.card-grid {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Card */
.card-container {
    position: absolute;
    width: 80px;
    height: 143px;
    perspective: 1000px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: center center;
}

/* Card stays at original z-index on hover */

.card-container.disabled {
    pointer-events: none;
    /* Keep normal appearance, just disable clicks */
}

.card-container.selecting {
    transition: all 0.5s ease;
}

/* Golden glow effect for selected card */
.card-container.selecting::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.8) 0%, rgba(255, 180, 0, 0.4) 40%, transparent 70%);
    border-radius: 16px;
    z-index: -1;
    animation: goldenGlow 0.6s ease-out forwards;
}

@keyframes goldenGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Sparkle particles */
.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #fff 0%, #ffd700 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    animation: sparkleFloat 0.8s ease-out forwards;
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--sparkle-x), var(--sparkle-y)) scale(0);
    }
}

/* Card slide out effect - keep visible with glow */
.card-container.selecting.slide-out {
    /* Card stays visible with golden glow effect */
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.15);
}

/* Only show shadow on spread cards, not stacked */
.card-container.spread .card-face {
    box-shadow: 0 4px 15px rgba(114, 47, 55, 0.25);
}

/* Stacked cards - minimal individual shadows */
.card-container.stacked .card-face {
    box-shadow: none;
}

/* Stack container shadow - single shadow for whole stack */
.card-grid.stacked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 160px;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(114, 47, 55, 0.4), 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: -1;
    pointer-events: none;
}

.card-grid.stacked.fade-in::after {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.card-grid:not(.stacked)::after {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-back {
    background: #FFB6C1;
}

.card-front {
    transform: rotateY(180deg);
    background: white;
}


/* Center Card (Large) */
.center-card-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 500px;
    z-index: 1001;
    perspective: 1000px;
    transform: translate(-50%, -90%) scale(0);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
}

.center-card-container.active {
    transform: translate(-50%, -90%) scale(1);
    opacity: 1;
}

.center-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.center-card.flipped {
    transform: rotateY(180deg);
}

.center-card .card-face {
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    overflow: hidden;
}

/* Result Panel */
.result-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cream);
    border-top: 4px solid var(--burgundy);
    border-radius: 30px 30px 0 0;
    padding: 30px;
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-panel.active {
    transform: translateY(0);
}

.result-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    text-align: center;
    color: var(--burgundy);
    margin-bottom: 10px;
    font-weight: 600;
}

.result-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    text-align: center;
    color: var(--burgundy);
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(114, 47, 55, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--burgundy);
}

.result-interpretation {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--burgundy);
    text-align: left;
    white-space: pre-line;
    max-width: 600px;
    margin: 0 auto;
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 8px;
}

.result-interpretation::-webkit-scrollbar {
    width: 6px;
}

.result-interpretation::-webkit-scrollbar-track {
    background: rgba(114, 47, 55, 0.1);
    border-radius: 3px;
}

.result-interpretation::-webkit-scrollbar-thumb {
    background: rgba(114, 47, 55, 0.3);
    border-radius: 3px;
}

.result-interpretation::-webkit-scrollbar-thumb:hover {
    background: rgba(114, 47, 55, 0.5);
}

/* Pick Counter */
.pick-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px auto;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(114, 47, 55, 0.08));
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--burgundy);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    max-width: fit-content;
}

.pick-counter.show {
    opacity: 1;
    transform: translateY(0);
}

.pick-counter-icon {
    font-size: 1rem;
}

.pick-counter-text {
    font-weight: 300;
}

#pickCountNumber {
    font-weight: 500;
    color: var(--gold);
    font-size: 1rem;
}

.retry-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto 0;
    font-family: 'Prompt', sans-serif;
    flex-wrap: wrap;
}

.retry-row-bottom {
    margin-top: 12px;
}

.retry-row .accept-btn {
    flex: none;
}

.retry-text {
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--burgundy);
    opacity: 0.6;
}

.result-close {
    display: inline-block;
    padding: 6px 16px;
    font-family: 'Prompt', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    background: var(--burgundy);
    color: var(--cream);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-close:hover {
    background: #5a252c;
    transform: scale(1.05);
}

/* Share Buttons */
.share-section {
    margin-top: 20px;
    text-align: center;
}

.share-label {
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--burgundy);
    margin-bottom: 12px;
    opacity: 0.8;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.line {
    background: #00B900;
    color: white;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Save Buttons */
.save-section {
    margin-top: 15px;
    text-align: center;
}

.save-label {
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--burgundy);
    margin-bottom: 10px;
    opacity: 0.8;
}

.save-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.save-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--burgundy);
    background: transparent;
    color: var(--burgundy);
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.save-btn:hover {
    background: var(--burgundy);
    color: var(--cream);
}

.save-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.save-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.save-label-inline {
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--burgundy);
    opacity: 0.8;
}

.save-btn.icon-only {
    padding: 8px 10px;
}

.save-btn.icon-only svg {
    width: 18px;
    height: 18px;
}

.save-btn.with-text {
    padding: 6px 12px;
}

.save-btn.with-text svg {
    width: 14px;
    height: 14px;
}

.copy-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--burgundy);
    color: var(--cream);
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
}

.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Footer */
footer {
    text-align: center;
    padding: 8px 20px;
    color: var(--burgundy);
    font-family: 'Cormorant Garamond', serif;
    flex-shrink: 0;
}

.brand {
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 0.7;
    margin: 0;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--burgundy);
}

/* Comment Section */
.comment-section {
    margin-top: 20px;
    text-align: center;
}

.comment-buttons-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    border: 2px solid var(--burgundy);
    background: linear-gradient(135deg, rgba(139, 69, 79, 0.1) 0%, rgba(139, 69, 79, 0.05) 100%);
    color: var(--burgundy);
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(139, 69, 79, 0.15);
    position: relative;
    overflow: hidden;
}

.comment-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    border-radius: 50%;
}

.comment-toggle-btn:hover::before {
    width: 300px;
    height: 300px;
}

.comment-toggle-btn:hover {
    background: linear-gradient(135deg, var(--burgundy) 0%, #a04858 100%);
    color: var(--cream);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 79, 0.35);
}

.comment-toggle-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(139, 69, 79, 0.25);
}

.comment-toggle-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.comment-toggle-btn:hover svg {
    transform: scale(1.1);
}

.comment-toggle-btn.active {
    background: linear-gradient(135deg, var(--burgundy) 0%, #a04858 100%);
    color: var(--cream);
}

.comment-toggle-btn.commented {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
    color: white;
    cursor: default;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.comment-toggle-btn.commented:hover {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    transform: none;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.comment-toggle-btn.commented::before {
    display: none;
}

.view-comments-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid var(--gold);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.view-comments-btn:hover {
    background: var(--gold);
    color: var(--cream);
}

.view-comments-btn svg {
    width: 20px;
    height: 20px;
}

/* Accept Actions Container */
.accept-actions {
    animation: fadeIn 0.3s ease;
    margin-top: 10px;
}

.comment-form {
    margin-top: 15px;
    padding: 15px;
    background: rgba(139, 69, 79, 0.05);
    border-radius: 15px;
    text-align: left;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-input-group {
    margin-bottom: 12px;
    position: relative;
}

.comment-input-group label {
    display: block;
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--burgundy);
    margin-bottom: 5px;
}

.comment-input-group input,
.comment-input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid rgba(139, 69, 79, 0.3);
    border-radius: 10px;
    background: var(--cream);
    color: var(--burgundy);
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.comment-input-group input:focus,
.comment-input-group textarea:focus {
    outline: none;
    border-color: var(--burgundy);
}

.comment-input-group textarea {
    min-height: 80px;
    resize: vertical;
}

.char-count {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    color: rgba(139, 69, 79, 0.5);
}

.comment-input-group textarea + .char-count {
    bottom: 12px;
}

.comment-submit-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, var(--burgundy) 0%, #a04858 100%);
    color: var(--cream);
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(139, 69, 79, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.comment-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.comment-submit-btn:hover::before {
    left: 100%;
}

.comment-submit-btn:hover {
    background: linear-gradient(135deg, #a04858 0%, var(--burgundy) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 69, 79, 0.4);
}

.comment-submit-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(139, 69, 79, 0.3);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.comment-submit-btn:disabled::before {
    display: none;
}

.comment-submit-btn.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Comments Button (Bottom Left) */
.comments-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(114, 47, 55, 0.1);
    border: 1px solid rgba(114, 47, 55, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.comments-btn:hover {
    background: rgba(114, 47, 55, 0.2);
    transform: scale(1.05);
}

.comments-btn:active {
    transform: scale(0.95);
}

.comments-btn svg {
    width: 20px;
    height: 20px;
    color: var(--burgundy);
    opacity: 0.7;
}

.comments-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--burgundy);
    color: var(--cream);
    border-radius: 10px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.comments-count.show {
    display: flex;
}

/* Comments Panel */
.comments-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.comments-overlay.show {
    opacity: 1;
    visibility: visible;
}

.comments-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(135deg, #F5E6D3 0%, #EDE0D4 100%);
    border-radius: 0;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.comments-panel.show {
    transform: translateY(0);
}

.comments-panel-header {
    padding: 12px 15px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.comments-panel-title {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comments-panel-header h3 {
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    color: rgba(139, 69, 79, 0.5);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.comments-panel-user {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--burgundy);
    font-weight: 600;
    line-height: 1.2;
}

.comments-panel-user.anonymous {
    font-style: italic;
    color: rgba(139, 69, 79, 0.6);
}

.comments-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--burgundy);
    background: rgba(255, 255, 255, 0.9);
    color: var(--burgundy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(139, 69, 79, 0.2);
}

.comments-panel-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.comments-panel-close:hover {
    background: var(--burgundy);
    color: white;
    transform: scale(1.1);
}

/* Comments Tabs */
.comments-tabs {
    display: flex;
    gap: 0;
    padding: 0 15px;
    border-bottom: 1px solid rgba(139, 69, 79, 0.15);
    background: rgba(255, 255, 255, 0.3);
}

.comments-tab {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(139, 69, 79, 0.5);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.comments-tab:hover {
    color: var(--burgundy);
}

.comments-tab.active {
    color: var(--burgundy);
    font-weight: 500;
}

.comments-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--burgundy);
    border-radius: 2px;
}

/* Hide "Me" tab by default - shown by JS if user has comments */
.comments-tab[data-tab="me"] {
    display: none;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding: 15px 15px 15px 25px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.comments-loading {
    text-align: center;
    padding: 40px;
    color: var(--burgundy);
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    opacity: 0.7;
}

/* Comments section titles */
.comments-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--burgundy);
    padding: 5px 0 8px 0;
    opacity: 0.8;
}

.comments-section-title.recent {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px dashed rgba(139, 69, 79, 0.2);
}

/* Reply badge for top comments */
.comment-reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--gold);
    background: rgba(201, 162, 39, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.comment-card.top-comment {
    border-color: rgba(201, 162, 39, 0.3);
    box-shadow: 0 2px 12px rgba(201, 162, 39, 0.15);
}

.comment-card {
    background: linear-gradient(135deg, #FFFDF9 0%, #F9F3EB 100%);
    border: 1px solid rgba(139, 69, 79, 0.15);
    border-radius: 12px;
    padding: 15px;
    position: relative;
    box-shadow: 0 2px 8px rgba(139, 69, 79, 0.08);
    animation: fadeInUp 0.4s ease;
    overflow: visible;
}

.comment-card.with-image {
    padding-left: 75px;
    min-height: 115px;
    padding-bottom: 20px;
}

.comment-card-image {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%) rotate(-8deg);
    width: 70px;
    z-index: 2;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.comment-card:hover .comment-card-image {
    transform: translateY(-50%) rotate(-3deg) scale(1.08);
}

.comment-card-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.comment-card-content {
    flex: 1;
    min-width: 0;
}

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

/* New comment highlight animation */
.comment-card.new-comment {
    animation: newCommentPulse 0.5s ease;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.4), 0 4px 15px rgba(139, 69, 79, 0.15);
}

@keyframes newCommentPulse {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.6);
    }
    50% {
        transform: translateY(5px) scale(1.02);
        box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.3);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.4), 0 4px 15px rgba(139, 69, 79, 0.15);
    }
}

/* Navigated card styling */
.comment-card.navigated-card {
    border-left: 3px solid var(--gold);
    animation: fadeInCard 0.3s ease;
}

@keyframes fadeInCard {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade out animation for navigated cards */
.comment-card.fading-out {
    animation: fadeOutCard 0.3s ease forwards;
}

@keyframes fadeOutCard {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

.comment-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed rgba(139, 69, 79, 0.1);
    border-radius: 8px;
    pointer-events: none;
}

.comment-card.with-image::before {
    left: 65px;
}

/* Fix dashed border height when expanded - keep it at original card size */
.comment-card.expanded::before {
    bottom: auto;
    height: 95px;
}

.comment-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--burgundy);
    font-style: italic;
}

.comment-card-tarot {
    display: inline-block;
    background: rgba(139, 69, 79, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.65rem;
    color: var(--burgundy);
}

.comment-card-date {
    font-family: 'Prompt', sans-serif;
    font-size: 0.65rem;
    color: rgba(139, 69, 79, 0.45);
    position: absolute;
    bottom: 12px;
    right: 15px;
}

.comment-card-text {
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #5a3d41;
    line-height: 1.4;
    position: relative;
    padding-left: 15px;
    margin-bottom: 6px;
    /* Limit to 2 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-card-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: rgba(139, 69, 79, 0.3);
}

/* Expanded Comment Card State */
.comment-card {
    cursor: pointer;
}

.comment-card.expanded {
    background: linear-gradient(135deg, #FFF9F0 0%, #F5E6D3 100%);
    box-shadow: 0 8px 30px rgba(139, 69, 79, 0.2);
    z-index: 10;
    padding-bottom: 15px;
    overflow: visible;
}

.comment-card.expanded.with-image {
    min-height: auto;
    padding-bottom: 15px;
}

.comment-card.expanded .comment-card-image {
    top: 57px;
    transform: translateY(-50%) rotate(-8deg);
}

.comment-card.expanded:hover .comment-card-image {
    transform: translateY(-50%) rotate(-3deg) scale(1.08);
}

.comment-card.expanded .comment-card-text {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.comment-card.expanded .comment-card-date {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 10px;
}

/* Full interpretation section */
.comment-card-full {
    display: none;
}

.comment-card.expanded .comment-card-full {
    display: block;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(139, 69, 79, 0.2);
}

.comment-card.expanded.with-image .comment-card-full {
    margin-left: -60px;
    padding-left: 0;
}

.comment-card-full-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.comment-card-full-title .comment-card-tarot {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: rgba(139, 69, 79, 0.12);
}

.comment-card-full-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--burgundy);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-card-full-label::before {
    content: '✦';
    font-size: 0.75rem;
}

.comment-card-full-interpretation {
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: #5a3d41;
    line-height: 1.6;
    white-space: pre-line;
}

/* Replies section (expanded view) */
.comment-card-replies-section {
    display: none;
}

.comment-card.expanded .comment-card-replies-section {
    display: block;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(139, 69, 79, 0.2);
}

.comment-card.expanded.with-image .comment-card-replies-section {
    margin-left: -60px;
    padding-left: 0;
}

.comment-card-replies-title {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(139, 69, 79, 0.7);
    margin-bottom: 8px;
}

.replies-empty-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--burgundy);
    padding: 12px;
    background: rgba(139, 69, 79, 0.08);
    border: 1px dashed rgba(139, 69, 79, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.replies-empty-btn:hover {
    background: rgba(139, 69, 79, 0.15);
    border-color: rgba(139, 69, 79, 0.5);
}

/* Related comments section */
.comment-card-related {
    display: none;
}

.comment-card.expanded .comment-card-related {
    display: block;
    max-height: 300px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(139, 69, 79, 0.2);
    overflow-y: auto;
}

.comment-card.expanded.with-image .comment-card-related {
    margin-left: -60px;
    padding-left: 0;
}

/* Hide card image and related comments in cardview mode (already shown in header) */
.cardview-mode .comment-card-image {
    display: none !important;
}

.cardview-mode .comment-card-related {
    display: none !important;
}

.comment-card-related-title {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(139, 69, 79, 0.7);
    margin-bottom: 10px;
}

.related-comment {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid rgba(139, 69, 79, 0.3);
}

.related-comment:last-child {
    margin-bottom: 0;
}

.related-comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.related-comment-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--burgundy);
    font-style: italic;
}

.related-comment-date {
    font-family: 'Prompt', sans-serif;
    font-size: 0.6rem;
    color: rgba(139, 69, 79, 0.45);
}

.related-comment-text {
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: #5a3d41;
    line-height: 1.4;
}

.related-comment-loading,
.related-comment-empty {
    text-align: center;
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    color: rgba(139, 69, 79, 0.5);
    padding: 10px;
}

.related-comment:hover {
    background: rgba(255, 255, 255, 0.7);
    border-left-color: var(--burgundy);
    transform: translateX(2px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.related-comment-replies {
    font-family: 'Prompt', sans-serif;
    font-size: 0.65rem;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    margin-right: 8px;
}

/* Reply Feature Styles */
.comment-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.reply-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    color: rgba(139, 69, 79, 0.6);
    transition: all 0.2s ease;
    border-radius: 12px;
}

.reply-btn:hover {
    background: rgba(139, 69, 79, 0.1);
    color: var(--burgundy);
}

.reply-btn svg {
    width: 14px;
    height: 14px;
}

.reply-count {
    font-size: 0.65rem;
    background: rgba(139, 69, 79, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 2px;
}

/* Reply Form */
.reply-form {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-top: 0;
}

.reply-form.show {
    max-height: 150px;
    opacity: 1;
    margin-top: 10px;
}

.reply-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.reply-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(139, 69, 79, 0.2);
    border-radius: 16px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    background: rgba(255, 255, 255, 0.8);
    resize: none;
    min-height: 36px;
    max-height: 80px;
}

.reply-input:focus {
    outline: none;
    border-color: var(--burgundy);
}

.reply-submit-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--burgundy);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.reply-submit-btn:hover {
    background: #6d3a42;
    transform: scale(1.05);
}

.reply-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reply-submit-btn svg {
    width: 16px;
    height: 16px;
}

/* Replies List */
.replies-list {
    padding-left: 15px;
    border-left: 2px solid rgba(139, 69, 79, 0.15);
    margin-bottom: 12px;
}

.reply-item {
    padding: 8px 10px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.reply-item:last-child {
    margin-bottom: 0;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.reply-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--burgundy);
    font-style: italic;
}

.reply-date {
    font-family: 'Prompt', sans-serif;
    font-size: 0.55rem;
    color: rgba(139, 69, 79, 0.45);
}

.reply-text {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: #5a3d41;
    line-height: 1.4;
}

.comments-load-more {
    text-align: center;
    padding: 15px;
}

.comments-load-more-btn {
    padding: 10px 25px;
    border-radius: 20px;
    border: 1px solid var(--burgundy);
    background: transparent;
    color: var(--burgundy);
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.comments-load-more-btn:hover {
    background: var(--burgundy);
    color: var(--cream);
}

.comments-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comments-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--burgundy);
    opacity: 0.6;
}

.comments-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

.comments-empty-text {
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
}

/* Comments CTA - Go to draw card */
.comments-empty-cta {
    opacity: 1;
    padding: 50px 30px;
    position: relative;
}

.comments-empty-cta .comments-empty-text {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--burgundy);
    margin-bottom: 8px;
}

.cta-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.cta-sparkles .sparkle {
    position: absolute;
    color: var(--gold);
    font-size: 1.2rem;
    animation: sparkle-float 3s ease-in-out infinite;
    opacity: 0.6;
}

.cta-sparkles .s1 { top: 15%; left: 15%; animation-delay: 0s; }
.cta-sparkles .s2 { top: 25%; right: 20%; animation-delay: 1s; }
.cta-sparkles .s3 { bottom: 20%; left: 25%; animation-delay: 2s; }

@keyframes sparkle-float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-8px) scale(1.2); opacity: 0.8; }
}

.cta-card-icon {
    width: 80px;
    height: 100px;
    margin: 0 auto 20px;
    color: var(--burgundy);
    opacity: 0.7;
    animation: card-float 4s ease-in-out infinite;
}

.cta-card-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes card-float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

.cta-subtitle {
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(114, 47, 55, 0.6);
    margin: 0 0 25px 0;
}

.cta-draw-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--burgundy) 0%, #8b4f5a 100%);
    color: var(--cream);
    border: none;
    border-radius: 30px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(114, 47, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-draw-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-draw-btn:hover::before {
    left: 100%;
}

.cta-draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 47, 55, 0.4);
}

.cta-draw-btn:active {
    transform: translateY(0);
}

.cta-draw-btn svg {
    width: 22px;
    height: 22px;
    opacity: 0.9;
}

/* Cardview Tab - View specific card comments */
.comments-tab-cardview {
    position: relative;
    padding: 8px 12px !important;
    margin-left: auto;
    overflow: visible;
}

.comments-tab-cardview.active {
    color: var(--burgundy);
    font-weight: 500;
}

.comments-tab-cardview.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.tab-card-preview {
    width: 32px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    border: 1.5px solid var(--gold);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(-8deg);
    transition: transform 0.2s ease;
}

.comments-tab-cardview:hover .tab-card-preview {
    transform: translateX(-50%) rotate(-3deg) translateY(-2px);
}

.comments-tab-cardview.active .tab-card-preview {
    transform: translateX(-50%) rotate(-5deg) scale(1.05);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* Cardview Header - Card image overflow */
.cardview-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 20px;
    margin: -80px -15px 20px -25px;
    background: linear-gradient(180deg,
        rgba(245, 230, 211, 0.98) 0%,
        rgba(245, 230, 211, 0.95) 60%,
        transparent 100%
    );
    position: relative;
}

.cardview-card-wrapper {
    position: relative;
    margin-top: 20px;
}

.cardview-card-image {
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow:
        0 8px 25px rgba(114, 47, 55, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--gold);
}

.cardview-card-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
    z-index: -1;
    animation: card-glow-pulse 3s ease-in-out infinite;
}

@keyframes card-glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.cardview-card-name {
    margin-top: 12px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--burgundy);
    text-align: center;
}

.cardview-comment-count {
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(114, 47, 55, 0.6);
    margin-top: 4px;
}

/* My Card Tab Sections */
/* My Card Tab Sections */
.mycard-section {
    margin-bottom: 10px;
}

.mycard-section-replied {
    margin-top: 25px;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 5px;
    margin-bottom: 12px;
}

.section-label {
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(114, 47, 55, 0.7);
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(114, 47, 55, 0.3), rgba(114, 47, 55, 0.1));
}

.section-count {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--burgundy);
    min-width: 20px;
    text-align: center;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .envelope-container {
        width: 85vw;
        height: 60vw;
        max-width: none;
        max-height: none;
    }

    .wax-seal {
        width: 110px;
        height: 110px;
    }

    .wax-seal::before {
        width: 85px;
        height: 85px;
    }

    .landing-heading {
        font-size: 2.2rem;
        max-width: 300px;
        margin-top: 6vh;
    }

    .spinning-card-container {
        width: 150px;
        height: 268px;
    }

    .card-click-hint {
        font-size: 0.85rem;
        bottom: -50px;
    }

    .card-grid.stacked::after {
        width: 70px;
        height: 125px;
    }

    footer {
        padding: 5px 15px;
    }

    .center-card-container {
        width: 240px;
        height: 429px;
    }

    .result-panel {
        padding: 20px;
    }

    .result-card-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .envelope-container {
        width: 90vw;
        height: 63vw;
    }

    .wax-seal {
        width: 95px;
        height: 95px;
    }

    .wax-seal::before {
        width: 72px;
        height: 72px;
    }

    .landing-heading {
        font-size: 2.3rem;
        max-width: 280px;
        margin-top: 5vh;
    }

    .spinning-card-container {
        width: 180px;
        height: 321px;
    }

    .card-click-hint {
        font-size: 0.8rem;
        bottom: -50px;
    }

    .card-grid.stacked::after {
        width: 55px;
        height: 100px;
    }

    /* Ensure footer is always visible on mobile */
    .main-page .container {
        padding-bottom: 50px;
    }

    .main-page footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: transparent;
        padding: 8px 10px;
        z-index: 100;
    }

    .footer-social {
        margin-bottom: 4px;
    }

    .footer-social svg {
        width: 22px;
        height: 22px;
    }

    .social-icons a {
        opacity: 0.6;
    }

    .brand {
        font-size: 0.75rem;
        opacity: 0.5;
    }

    .center-card-container {
        width: 200px;
        height: 357px;
    }
}

/* ==================== ANALYTICS PAGE ==================== */
.analytics-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.analytics-page.show {
    opacity: 1;
    visibility: visible;
}

.analytics-header {
    position: relative;
    text-align: center;
    padding: 40px 20px 30px;
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.1) 0%, transparent 100%);
}

.analytics-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.analytics-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.analytics-close svg {
    width: 20px;
    height: 20px;
}

.analytics-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(201, 162, 39, 0.3);
}

.analytics-subtitle {
    font-family: 'Prompt', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.analytics-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.analytics-section {
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gold);
    border-radius: 2px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.stat-card.gradient-pink {
    background: linear-gradient(135deg, #722F37 0%, #a04050 100%);
}

.stat-card.gradient-purple {
    background: linear-gradient(135deg, #5b2c6f 0%, #8e44ad 100%);
}

.stat-card.gradient-blue {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
}

.stat-card.gradient-gold {
    background: linear-gradient(135deg, #7d6608 0%, #c9a227 100%);
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    color: rgba(255, 255, 255, 0.8);
}

.stat-icon svg {
    width: 100%;
    height: 100%;
}

.stat-value {
    font-family: 'Prompt', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Top Cards List */
.top-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-card-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.top-card-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.top-card-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.top-card-rank.gold {
    background: linear-gradient(135deg, #c9a227 0%, #f4d03f 100%);
    color: #1a1a2e;
}

.top-card-rank.silver {
    background: linear-gradient(135deg, #a0a0a0 0%, #d0d0d0 100%);
    color: #1a1a2e;
}

.top-card-rank.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a56c 100%);
    color: #1a1a2e;
}

.top-card-rank.normal {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.top-card-image {
    width: 45px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.top-card-info {
    flex: 1;
    min-width: 0;
}

.top-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-card-count {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.top-card-bar {
    width: 60px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.top-card-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, #f4d03f 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* All Cards Grid */
.all-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.card-grid-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.card-grid-image {
    width: 45px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.card-grid-count {
    margin-top: 4px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.card-grid-rank {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Prompt', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    z-index: 1;
}

.card-grid-rank.gold {
    background: linear-gradient(135deg, #c9a227 0%, #f4d03f 100%);
    color: #1a1a2e;
}

.card-grid-rank.silver {
    background: linear-gradient(135deg, #a8a8a8 0%, #d4d4d4 100%);
    color: #1a1a2e;
}

.card-grid-rank.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a857 100%);
    color: #1a1a2e;
}

/* Chart Container */
.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-bar-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-bar-label {
    width: 80px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.chart-bar-track {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    transition: width 0.8s ease;
    min-width: 40px;
}

.chart-bar-fill.ig-story {
    background: linear-gradient(90deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

.chart-bar-fill.square {
    background: linear-gradient(90deg, #c13584 0%, #e1306c 100%);
}

.chart-bar-fill.facebook {
    background: linear-gradient(90deg, #1877F2 0%, #42a5f5 100%);
}

.chart-bar-fill.wide {
    background: linear-gradient(90deg, #722F37 0%, #a04050 100%);
}

.chart-bar-fill.messenger {
    background: linear-gradient(90deg, #00b2ff 0%, #006aff 100%);
}

.chart-bar-fill.line {
    background: linear-gradient(90deg, #00B900 0%, #32cd32 100%);
}

.chart-bar-fill.copy {
    background: linear-gradient(90deg, #6c757d 0%, #adb5bd 100%);
}

/* Time to Pick Colors */
.chart-bar-fill.instant {
    background: linear-gradient(90deg, #00c853 0%, #69f0ae 100%);
}

.chart-bar-fill.quick {
    background: linear-gradient(90deg, #64dd17 0%, #b2ff59 100%);
}

.chart-bar-fill.normal {
    background: linear-gradient(90deg, #ffc107 0%, #ffeb3b 100%);
}

.chart-bar-fill.medium {
    background: linear-gradient(90deg, #ff9800 0%, #ffb74d 100%);
}

.chart-bar-fill.slow {
    background: linear-gradient(90deg, #f44336 0%, #ef9a9a 100%);
}

/* Scroll Depth Colors */
.chart-bar-fill.scroll-low {
    background: linear-gradient(90deg, #ff5252 0%, #ff8a80 100%);
}

.chart-bar-fill.scroll-med {
    background: linear-gradient(90deg, #ff9800 0%, #ffcc80 100%);
}

.chart-bar-fill.scroll-high {
    background: linear-gradient(90deg, #4caf50 0%, #a5d6a7 100%);
}

.chart-bar-fill.scroll-complete {
    background: linear-gradient(90deg, #2196f3 0%, #90caf9 100%);
}

.chart-bar-value {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Social Stats Grid */
.social-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.social-stat-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-stat-card.instagram {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.3), rgba(253, 29, 29, 0.3), rgba(252, 176, 69, 0.3));
}

.social-stat-card.tiktok {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(37, 244, 238, 0.2), rgba(254, 44, 85, 0.2));
}

.social-stat-card.facebook {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.3), rgba(66, 165, 245, 0.2));
}

.social-stat-card.youtube {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.3), rgba(190, 0, 0, 0.2));
}

.social-stat-card.line {
    background: linear-gradient(135deg, rgba(0, 185, 0, 0.3), rgba(0, 140, 0, 0.2));
}

.social-breakdown {
    font-size: 0.6rem;
    opacity: 0.6;
    margin-top: 5px;
}

.social-stat-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    color: white;
}

.social-stat-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.social-stat-value {
    font-family: 'Prompt', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
}

.social-stat-label {
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hot Comments List */
.hot-comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hot-comment-card {
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--gold);
}

.hot-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.hot-comment-user {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    font-style: italic;
}

.hot-comment-replies {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(201, 162, 39, 0.2);
    border-radius: 12px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    color: var(--gold);
}

.hot-comment-replies svg {
    width: 12px;
    height: 12px;
}

.hot-comment-card-name {
    font-family: 'Prompt', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.hot-comment-text {
    font-family: 'Prompt', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* Loading Spinner */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Analytics Footer */
.analytics-footer {
    text-align: center;
    padding: 40px 20px 60px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
}

.analytics-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 3px;
    margin-top: 10px;
}

/* User Journey Funnel */
.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.funnel-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), transparent);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.funnel-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--bar-width, 0%);
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0.3;
    transition: width 0.5s ease;
}

.funnel-step-label {
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    min-width: 80px;
    z-index: 1;
}

.funnel-step-value {
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gold);
    z-index: 1;
}

.funnel-step-percent {
    margin-left: auto;
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    z-index: 1;
}

/* Device Stats Grid */
.device-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.device-stat {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.device-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    color: var(--gold);
}

.device-name {
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 5px;
}

.device-value {
    font-family: 'Prompt', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: white;
}

.device-percent {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* Feature Usage Grid */
.feature-usage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.feature-name {
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
}

.feature-total {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    color: var(--gold);
}

.feature-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feature-action {
    display: flex;
    justify-content: space-between;
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

/* Position Heatmap */
.position-heatmap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.heatmap-circle {
    position: relative;
    width: 250px;
    height: 250px;
}

.heatmap-section {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.heatmap-section.hot {
    background: linear-gradient(135deg, rgba(255,75,75,0.4), rgba(255,150,75,0.3));
    border-color: rgba(255,100,100,0.5);
}

.heatmap-section.warm {
    background: linear-gradient(135deg, rgba(255,200,75,0.3), rgba(255,150,75,0.2));
    border-color: rgba(255,200,100,0.4);
}

.heatmap-section.cool {
    background: linear-gradient(135deg, rgba(75,150,255,0.2), rgba(100,200,255,0.1));
    border-color: rgba(100,200,255,0.3);
}

.heatmap-section-label {
    font-family: 'Prompt', sans-serif;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.7);
}

.heatmap-section-value {
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.heatmap-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.heatmap-center-label {
    font-family: 'Prompt', sans-serif;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
}

.heatmap-center-value {
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gold);
}

/* Responsive adjustments for new sections */
@media (max-width: 480px) {
    .device-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .device-stat {
        padding: 12px 8px;
    }

    .device-icon {
        width: 30px;
        height: 30px;
    }

    .device-value {
        font-size: 1.1rem;
    }

    .feature-usage-grid {
        grid-template-columns: 1fr;
    }

    .heatmap-circle {
        width: 200px;
        height: 200px;
    }

    .heatmap-section {
        width: 45px;
        height: 45px;
    }

    .heatmap-center {
        width: 60px;
        height: 60px;
    }
}

/* Empty State */
.analytics-empty {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 480px) {
    .analytics-title {
        font-size: 1.8rem;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .top-card-image {
        width: 35px;
        height: 62px;
    }

    .social-stats-grid {
        gap: 10px;
    }

    .all-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 5px;
        padding: 10px;
    }

    .card-grid-image {
        width: 38px;
        height: 58px;
    }

    .card-grid-count {
        font-size: 0.55rem;
    }

    .card-grid-rank {
        width: 14px;
        height: 14px;
        font-size: 0.5rem;
        top: -3px;
        right: -3px;
    }
}

/* ========================================
   Blessing Celebration Screen
   ======================================== */

.blessing-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 15, 18, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.blessing-screen.active {
    display: flex;
    animation: blessingFadeIn 0.8s ease forwards;
}

@keyframes blessingFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Glowing background effect */
.blessing-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0.1) 40%, transparent 70%);
    transform: translate(-50%, -60%);
    animation: blessingGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes blessingGlow {
    0%, 100% {
        transform: translate(-50%, -60%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -60%) scale(1.2);
        opacity: 1;
    }
}


/* Card container - 3D spinning effect like homepage */
.blessing-card-container {
    position: relative;
    width: 200px;
    height: 357px; /* 200 * 1.783 (tarot ratio) */
    perspective: 1500px;
    transform-style: preserve-3d;
    animation: blessingCardZoomIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: scale(0);
}

/* Pulsating aura behind the card */
.blessing-card-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 380px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(212, 175, 55, 0.2) 30%,
        rgba(180, 130, 70, 0.1) 50%,
        transparent 70%
    );
    border-radius: 50%;
    animation: auraGlow 3s ease-in-out infinite;
    z-index: -1;
    filter: blur(20px);
}

/* Reflection below the card */
.blessing-card-container::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 50%;
    width: 160px;
    height: 30px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center,
        rgba(212, 175, 55, 0.3) 0%,
        rgba(212, 175, 55, 0.1) 40%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(8px);
    animation: reflectionPulse 3s ease-in-out infinite;
}

/* Wrapper - spins around Y-axis */
.blessing-card-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: center center;
    animation: blessingSpinOnY 3s linear infinite;
}

/* Inner card - tilted like homepage */
.blessing-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: center center;
    /* Tilt so diagonal becomes vertical - same as homepage */
    transform: rotate(-29.3deg);
}

/* Card faces */
.blessing-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 30px 60px rgba(114, 47, 55, 0.5),
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(212, 175, 55, 0.4);
}

.blessing-card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blessing-card-back {
    transform: rotateY(180deg);
}

/* Blessing sparkle particles */
.blessing-card-container .blessing-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 215, 0, 0.8) 30%,
        transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
    z-index: 10;
}

@keyframes blessingSparkleRise {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translate(calc(var(--move-x) * 0.2), calc(var(--move-y) * 0.2)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--move-x), var(--move-y)) scale(0.5);
    }
}

@keyframes blessingSpinOnY {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

@keyframes auraGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

@keyframes reflectionPulse {
    0%, 100% {
        transform: translateX(-50%) scaleX(1);
        opacity: 0.6;
    }
    50% {
        transform: translateX(-50%) scaleX(1.2);
        opacity: 0.9;
    }
}

@keyframes blessingCardZoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* Card area wrapper */
.blessing-card-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Comment overlay - main text element */
.blessing-comment-overlay {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20;
    animation: commentOverlayFadeIn 1.2s ease 1s forwards;
    opacity: 0;
    width: 90vw;
    max-width: 90vw;
    padding: 0 20px;
}

@keyframes commentOverlayFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.blessing-name {
    font-family: 'Prompt', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #d4af37;
    margin-bottom: 12px;
    text-shadow:
        0 2px 20px rgba(0, 0, 0, 0.95),
        0 0 40px rgba(212, 175, 55, 0.4);
    letter-spacing: 1px;
}

.blessing-comment {
    font-family: 'Sarabun', sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    font-style: italic;
    color: rgba(245, 230, 211, 0.95);
    width: 100%;
    max-width: none;
    margin: 0 auto;
    line-height: 1.7;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.95);
}

/* Social channels section */
.blessing-social-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 60px;
}

.blessing-social-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(245, 230, 211, 0.8);
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    transition: all 0.3s ease;
    opacity: 0;
    animation: socialItemFadeIn 0.6s ease forwards;
    animation-delay: var(--delay);
}

.blessing-social-item:hover {
    color: #d4af37;
}

.blessing-social-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@keyframes socialItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LINE section */
.blessing-line-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    opacity: 0;
    animation: socialItemFadeIn 0.6s ease forwards;
    animation-delay: var(--delay);
}

.blessing-line-label {
    font-family: 'Prompt', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(245, 230, 211, 0.6);
}

.blessing-line-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00B900;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.blessing-line-link:hover {
    transform: scale(1.05);
}

.blessing-line-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Restart button - bottom right */
.blessing-restart-btn {
    position: absolute;
    bottom: 25px;
    right: 25px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 20px;
    border: none;
    background: rgba(212, 175, 55, 0.15);
    color: rgba(212, 175, 55, 0.8);
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    animation: buttonFadeIn 1s ease 2.8s forwards;
    opacity: 0;
}

.blessing-restart-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    color: #d4af37;
}

.restart-arrow {
    font-weight: 400;
    letter-spacing: -2px;
}

@keyframes buttonFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .blessing-card-container {
        width: 140px;
        height: 250px;
    }

    .blessing-comment-overlay {
        bottom: -25px;
        width: 95vw;
        max-width: 95vw;
    }

    .blessing-name {
        font-size: 1.2rem;
    }

    .blessing-comment {
        font-size: 1rem;
        max-width: none;
    }

    .blessing-restart-btn {
        bottom: 15px;
        right: 15px;
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .blessing-glow {
        width: 300px;
        height: 300px;
    }

    .blessing-social-item {
        font-size: 0.8rem;
    }

    .blessing-social-item svg {
        width: 18px;
        height: 18px;
    }
}

@media (min-width: 768px) {
    .blessing-card-container {
        width: 200px;
        height: 357px;
    }

    .blessing-glow {
        width: 500px;
        height: 500px;
    }

    .blessing-comment-overlay {
        width: 85vw;
        max-width: 85vw;
    }

    .blessing-name {
        font-size: 1.6rem;
    }

    .blessing-comment {
        font-size: 1.35rem;
        max-width: none;
    }

    .blessing-restart-btn {
        bottom: 30px;
        right: 30px;
    }
}

/* ==================== LANGUAGE SWITCHER ==================== */
.lang-switcher {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10000;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(139, 69, 79, 0.2);
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--burgundy);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-code {
    font-weight: 500;
}

.lang-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(139, 69, 79, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    color: #5a3d41;
    transition: all 0.15s ease;
    text-align: left;
}

.lang-option:hover {
    background: rgba(139, 69, 79, 0.08);
}

.lang-option.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--burgundy);
    font-weight: 500;
}

.lang-option .lang-flag {
    font-size: 1.1rem;
}

.lang-option .lang-name {
    flex: 1;
}

/* Hide lang switcher on analytics page */
.analytics-page.show ~ .lang-switcher {
    display: none;
}

@media (max-width: 480px) {
    .lang-switcher {
        top: 10px;
        left: 10px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .lang-flag {
        font-size: 0.9rem;
    }
}
