/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@700;900&display=swap');

/* === NOISE TEXTURE === */
#noise-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3BaseFilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.08;
}

/* === CARD STYLES === */
.card-slot {
    aspect-ratio: 2/3;
    border-radius: 0.5rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    position: relative;
}

.playing-card {
    aspect-ratio: 2/3;
    background: white;
    border-radius: 0.4rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .playing-card .p-2 {
        padding: 0.25rem !important;
    }
    .playing-card .text-lg {
        font-size: 0.75rem !important;
        line-height: 1 !important;
    }
    .playing-card .text-sm {
        font-size: 0.6rem !important;
        line-height: 1 !important;
    }
    .playing-card .text-3xl {
        font-size: 1.25rem !important;
        line-height: 1 !important;
    }
    .tableau-pile {
        min-height: 120px !important;
    }
}

.playing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.playing-card.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    z-index: 1000 !important;
}

.playing-card.back {
    background: #1e3a8a;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    border: 3px solid white;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

/* module: home */
.tableau-pile {
    min-height: 200px;
    position: relative;
}

.tableau-card {
    position: absolute;
    width: 100%;
}

.red-suit { color: #dc2626; }
.black-suit { color: #000000; }

/* === CUSTOM ANIMATIONS === */
/* === CONFETTI === */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #d4af37;
    animation: confetti-fall 3s ease-out infinite;
}

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

@keyframes card-deal {
    from { transform: translate(-500px, -200px) rotate(-45deg); opacity: 0; }
    to { transform: translate(0, 0) rotate(0); opacity: 1; }
}

.deal-animation {
    animation: card-deal 0.5s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f2b1a;
}
::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f1e5ac;
}
