/* ================================================
   BOOKYSPIN CASINO - CUSTOM STYLES
   Booky Playroom Core Theme
   ================================================ */

/* ------------------------------------------------
   KEYFRAME ANIMATIONS
   ------------------------------------------------ */

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

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes particle-rise {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0.3125em rgba(253, 203, 110, 0.4);
    }
    50% {
        box-shadow: 0 0 1.25em rgba(253, 203, 110, 0.8);
    }
}

@keyframes tilt-shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(1deg);
    }
    75% {
        transform: rotate(-1deg);
    }
}

/* ------------------------------------------------
   ANIMATION CLASSES
   ------------------------------------------------ */

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ------------------------------------------------
   PARTICLE EFFECTS
   ------------------------------------------------ */

.particle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 0.5em;
    height: 0.5em;
    background: linear-gradient(135deg, #FDCB6E, #FD79A8);
    border-radius: 50%;
    animation: particle-rise 6s ease-in-out infinite;
    opacity: 0;
}

.particle:nth-child(odd) {
    background: linear-gradient(135deg, #74B9FF, #55EFC4);
    width: 0.375em;
    height: 0.375em;
}

.particle:nth-child(3n) {
    background: linear-gradient(135deg, #A29BFE, #FD79A8);
    width: 0.625em;
    height: 0.625em;
}

/* ------------------------------------------------
   TILT EFFECT ENHANCEMENTS
   ------------------------------------------------ */

.tilt-effect {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    transform-style: preserve-3d;
}

.tilt-effect:hover {
    box-shadow: 0 1.5625em 3.125em rgba(108, 92, 231, 0.15);
}

/* ------------------------------------------------
   NAVIGATION STYLES
   ------------------------------------------------ */

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.25em;
    left: 0;
    width: 0;
    height: 0.125em;
    background: #FDCB6E;
    border-radius: 0.0625em;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ------------------------------------------------
   TABLE RESPONSIVE WRAPPER
   ------------------------------------------------ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.table-responsive table {
    min-width: 100%;
}

/* ------------------------------------------------
   PROSE STYLING FOR MARKDOWN CONTENT
   ------------------------------------------------ */

.prose {
    font-size: 1rem;
    line-height: 1.75;
    color: #2D3436;
    max-width: 100%;
}

/* Headings */
.prose h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.75em;
    color: #6C5CE7;
    margin-top: 2em;
    margin-bottom: 0.75em;
    padding-bottom: 0.5em;
    border-bottom: 0.1875em solid #DFE6E9;
    line-height: 1.3;
}

.prose h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.375em;
    color: #2D3436;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.4;
}

.prose h4 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.125em;
    color: #6C5CE7;
    margin-top: 1.25em;
    margin-bottom: 0.5em;
}

/* Paragraphs */
.prose p {
    margin-bottom: 1.25em;
    color: #2D3436;
}

.prose p:first-of-type {
    font-size: 1.0625em;
    color: #4a5568;
}

/* Links */
.prose a {
    color: #6C5CE7;
    text-decoration: underline;
    text-decoration-color: #A29BFE;
    text-underline-offset: 0.1875em;
    transition: all 0.2s ease;
}

.prose a:hover {
    color: #FD79A8;
    text-decoration-color: #FD79A8;
}

/* Lists */
.prose ul,
.prose ol {
    margin: 1.25em 0;
    padding-left: 1.5em;
}

.prose ul {
    list-style-type: none;
}

.prose ul li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
    color: #2D3436;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.625em;
    width: 0.5em;
    height: 0.5em;
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    border-radius: 50%;
}

.prose ol {
    list-style-type: none;
    counter-reset: item;
}

.prose ol li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 0.625em;
    counter-increment: item;
    color: #2D3436;
}

.prose ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5em;
    height: 1.5em;
    background: #6C5CE7;
    color: white;
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5em 0;
    border-radius: 0.75em;
    overflow: hidden;
    box-shadow: 0 0.25em 0.9375em rgba(108, 92, 231, 0.1);
}

.prose .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5em 0;
    border-radius: 0.75em;
}

.prose thead {
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
}

.prose thead th {
    padding: 1em 1.25em;
    text-align: left;
    font-weight: 700;
    color: white;
    font-size: 0.9375em;
    white-space: nowrap;
}

.prose tbody tr {
    background: white;
    transition: background 0.2s ease;
}

.prose tbody tr:nth-child(even) {
    background: #F8F9FA;
}

.prose tbody tr:hover {
    background: #DFE6E9;
}

.prose tbody td {
    padding: 0.875em 1.25em;
    border-bottom: 0.0625em solid #DFE6E9;
    color: #2D3436;
    font-size: 0.9375em;
}

.prose tbody tr:last-child td {
    border-bottom: none;
}

/* Blockquotes */
.prose blockquote {
    margin: 1.5em 0;
    padding: 1.25em 1.5em;
    background: linear-gradient(135deg, #DFE6E9 0%, #F8F9FA 100%);
    border-left: 0.25em solid #6C5CE7;
    border-radius: 0 0.75em 0.75em 0;
    font-style: italic;
    color: #4a5568;
}

.prose blockquote p {
    margin-bottom: 0;
    color: #4a5568;
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

/* Code blocks */
.prose code {
    background: #2D3436;
    color: #55EFC4;
    padding: 0.125em 0.375em;
    border-radius: 0.25em;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.prose pre {
    background: #2D3436;
    color: #DFE6E9;
    padding: 1.25em;
    border-radius: 0.75em;
    overflow-x: auto;
    margin: 1.5em 0;
}

.prose pre code {
    background: transparent;
    padding: 0;
    color: #DFE6E9;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 1em;
    margin: 1.5em 0;
    box-shadow: 0 0.625em 1.875em rgba(108, 92, 231, 0.15);
}

/* Horizontal Rules */
.prose hr {
    border: none;
    height: 0.1875em;
    background: linear-gradient(90deg, transparent, #6C5CE7, #FD79A8, transparent);
    margin: 2.5em 0;
    border-radius: 0.125em;
}

/* Strong and Emphasis */
.prose strong {
    color: #2D3436;
    font-weight: 700;
}

.prose em {
    color: #6C5CE7;
    font-style: italic;
}

/* ------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   ------------------------------------------------ */

@media (max-width: 768px) {
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose h2 {
        font-size: 1.5em;
    }
    
    .prose h3 {
        font-size: 1.25em;
    }
    
    .prose thead th,
    .prose tbody td {
        padding: 0.625em 0.875em;
        font-size: 0.875em;
    }
    
    .prose ul li,
    .prose ol li {
        padding-left: 1.25em;
    }
}

/* ------------------------------------------------
   BUTTON ENHANCEMENTS
   ------------------------------------------------ */

.btn-primary {
    background: linear-gradient(135deg, #FDCB6E 0%, #FFEAA7 100%);
    color: #2D3436;
    font-weight: 700;
    padding: 0.875em 2em;
    border-radius: 3.125em;
    transition: all 0.3s ease;
    box-shadow: 0 0.25em 0.9375em rgba(253, 203, 110, 0.4);
}

.btn-primary:hover {
    transform: translateY(-0.125em);
    box-shadow: 0 0.5em 1.5625em rgba(253, 203, 110, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 0.125em solid #6C5CE7;
    color: #6C5CE7;
    font-weight: 700;
    padding: 0.875em 2em;
    border-radius: 3.125em;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #6C5CE7;
    color: white;
}

/* ------------------------------------------------
   CARD STYLES
   ------------------------------------------------ */

.card-playful {
    background: white;
    border-radius: 1.5em;
    padding: 1.5em;
    box-shadow: 0 0.625em 2.5em rgba(108, 92, 231, 0.1);
    border: 0.125em solid #DFE6E9;
    transition: all 0.3s ease;
}

.card-playful:hover {
    border-color: #A29BFE;
    transform: translateY(-0.3125em);
    box-shadow: 0 1.25em 3.125em rgba(108, 92, 231, 0.15);
}

/* ------------------------------------------------
   SCROLLBAR STYLING
   ------------------------------------------------ */

::-webkit-scrollbar {
    width: 0.5em;
    height: 0.5em;
}

::-webkit-scrollbar-track {
    background: #DFE6E9;
    border-radius: 0.25em;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6C5CE7, #A29BFE);
    border-radius: 0.25em;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5B4CD4, #8B7FE8);
}

/* ------------------------------------------------
   FOCUS STATES (Accessibility)
   ------------------------------------------------ */

a:focus,
button:focus {
    outline: 0.125em solid #FDCB6E;
    outline-offset: 0.125em;
}

/* ------------------------------------------------
   SELECTION STYLING
   ------------------------------------------------ */

::selection {
    background: #A29BFE;
    color: white;
}

::-moz-selection {
    background: #A29BFE;
    color: white;
}

/* ------------------------------------------------
   UTILITY CLASSES
   ------------------------------------------------ */

.shadow-playful {
    box-shadow: 0 0.625em 2.5em rgba(108, 92, 231, 0.15), 0 0.1875em 0.625em rgba(253, 121, 168, 0.1);
}

.gradient-text {
    background: linear-gradient(135deg, #6C5CE7, #FD79A8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-playful {
    border: 0.125em solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #6C5CE7, #FD79A8) border-box;
    border-radius: 1em;
}
