/* ============================================
   FLASHBET CASINO - VELOCITY CORE THEME
   Custom CSS: Animations, Overrides & Prose
   ============================================ */

/* Global Overflow Control */
html,
body {
    overflow-x: clip;
    overflow-y: auto;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.875rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flash Glow Pulse */
@keyframes flashGlow {
    0%, 100% {
        box-shadow: 0 0 1.25rem rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 1.875rem rgba(59, 130, 246, 0.5), 0 0 3.75rem rgba(6, 182, 212, 0.3);
    }
}

/* Speed Lines Animation */
@keyframes speedLines {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Flash Burst */
@keyframes flashBurst {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.1;
    }
}

/* Marquee Scroll */
@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Velocity Underline */
@keyframes velocityLine {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.flash-glow {
    animation: flashGlow 2s ease-in-out infinite;
}

/* ============================================
   SPEED LINES & FLASH EFFECTS
   ============================================ */

.speed-lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 6.25rem,
        rgba(139, 92, 246, 0.1) 6.25rem,
        rgba(139, 92, 246, 0.1) 6.375rem
    );
    animation: speedLines 3s linear infinite;
}

.speed-lines-footer {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 1.25rem,
        rgba(59, 130, 246, 0.05) 1.25rem,
        rgba(59, 130, 246, 0.05) 1.375rem
    );
}

.flash-overlay {
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: flashBurst 4s ease-in-out infinite;
}

.flash-burst {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: flashBurst 3s ease-in-out infinite alternate;
}

/* ============================================
   VELOCITY PATTERNS
   ============================================ */

.velocity-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(135deg, rgba(139, 92, 246, 0.1) 25%, transparent 25%),
        linear-gradient(225deg, rgba(139, 92, 246, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, rgba(139, 92, 246, 0.1) 25%, transparent 25%),
        linear-gradient(315deg, rgba(139, 92, 246, 0.1) 25%, transparent 25%);
    background-size: 3.125rem 3.125rem;
    background-position: 0 0, 1.5625rem 0, 1.5625rem -1.5625rem, 0 1.5625rem;
}

.velocity-pattern-alt {
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 49%, rgba(59, 130, 246, 0.1) 49%, rgba(59, 130, 246, 0.1) 51%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(139, 92, 246, 0.1) 49%, rgba(139, 92, 246, 0.1) 51%, transparent 51%);
    background-size: 3.125rem 3.125rem;
}

/* ============================================
   MARQUEE ANIMATION
   ============================================ */

.marquee-container {
    position: relative;
    width: 100%;
}

.marquee-track {
    display: flex;
    animation: marqueeScroll 30s linear infinite;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* ============================================
   VELOCITY UNDERLINE EFFECT
   ============================================ */

.velocity-underline {
    position: relative;
}

.velocity-underline::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    width: 100%;
    height: 0.125rem;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.velocity-underline:hover::after {
    transform: scaleX(1);
}

/* ============================================
   TABLE RESPONSIVE WRAPPER
   ============================================ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 37.5rem;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

.scrollbar-thin::-webkit-scrollbar {
    height: 0.5rem;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #12121f;
    border-radius: 0.25rem;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    border-radius: 0.25rem;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #7c3aed, #2563eb);
}

/* ============================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ============================================ */

.prose {
    color: #d1d5db;
    line-height: 1.75;
    max-width: 100%;
}

/* Headings */
.prose h2 {
    color: #ffffff;
    font-size: 1.75em;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 0.125rem solid #1e1e35;
    position: relative;
}

.prose h2::before {
    content: '';
    position: absolute;
    bottom: -0.125rem;
    left: 0;
    width: 5rem;
    height: 0.125rem;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
}

.prose h3 {
    color: #e5e7eb;
    font-size: 1.375em;
    font-weight: 600;
    margin-top: 1.75em;
    margin-bottom: 0.75em;
}

.prose h4 {
    color: #d1d5db;
    font-size: 1.125em;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* First Heading Reset */
.prose > h2:first-child,
.prose > h3:first-child {
    margin-top: 0;
}

/* Paragraphs */
.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose > p:first-child {
    margin-top: 0;
}

/* Links */
.prose a {
    color: #06b6d4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    border-bottom: 0.0625rem solid transparent;
}

.prose a:hover {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

/* Bold & Strong */
.prose strong,
.prose b {
    color: #ffffff;
    font-weight: 600;
}

/* Italic */
.prose em,
.prose i {
    font-style: italic;
}

/* Unordered Lists */
.prose ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose ul li {
    position: relative;
    padding-left: 1.75em;
    margin-bottom: 0.625em;
}

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

/* Ordered Lists */
.prose ol {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    counter-reset: item;
}

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

.prose ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75em;
    height: 1.75em;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: #ffffff;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nested Lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Blockquotes */
.prose blockquote {
    border-left: 0.25rem solid #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #e5e7eb;
}

.prose blockquote p {
    margin: 0;
}

/* Tables */
.prose .table-responsive {
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 0.75rem;
    border: 0.0625rem solid #1e1e35;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375em;
}

.prose thead {
    background: rgba(139, 92, 246, 0.15);
}

.prose th {
    color: #06b6d4;
    font-weight: 600;
    text-align: left;
    padding: 1em 1.25em;
    border-bottom: 0.0625rem solid #1e1e35;
}

.prose td {
    padding: 1em 1.25em;
    border-bottom: 0.0625rem solid #1e1e35;
    color: #d1d5db;
}

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

.prose tbody tr:hover {
    background: rgba(30, 30, 53, 0.5);
}

/* Horizontal Rules */
.prose hr {
    border: none;
    height: 0.0625rem;
    background: linear-gradient(90deg, transparent, #8b5cf6, #06b6d4, transparent);
    margin: 2.5em 0;
}

/* Code Inline */
.prose code {
    background: #12121f;
    color: #06b6d4;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Code Blocks */
.prose pre {
    background: #05050a;
    border: 0.0625rem solid #1e1e35;
    border-radius: 0.75rem;
    padding: 1.25em;
    overflow-x: auto;
    margin: 1.5em 0;
}

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

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5em 0;
    border: 0.0625rem solid #1e1e35;
}

/* Captions & Figcaptions */
.prose figcaption {
    color: #9ca3af;
    font-size: 0.875em;
    text-align: center;
    margin-top: 0.75em;
}

/* Mark / Highlight */
.prose mark {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    padding: 0.1em 0.3em;
    border-radius: 0.25rem;
}

/* Small Text */
.prose small {
    font-size: 0.875em;
    color: #9ca3af;
}

/* Definition Lists */
.prose dl {
    margin: 1.25em 0;
}

.prose dt {
    color: #ffffff;
    font-weight: 600;
    margin-top: 1em;
}

.prose dd {
    margin-left: 1.5em;
    color: #d1d5db;
}

/* Details/Summary */
.prose details {
    background: #12121f;
    border: 0.0625rem solid #1e1e35;
    border-radius: 0.75rem;
    margin: 1em 0;
    overflow: hidden;
}

.prose summary {
    padding: 1em 1.25em;
    cursor: pointer;
    color: #ffffff;
    font-weight: 500;
    transition: background 0.2s ease;
}

.prose summary:hover {
    background: rgba(139, 92, 246, 0.1);
}

.prose details[open] summary {
    border-bottom: 0.0625rem solid #1e1e35;
}

.prose details > *:not(summary) {
    padding: 0 1.25em 1em;
}

/* ============================================
   PARALLAX EFFECT
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
    .parallax-bg {
        transform: translateZ(0);
        will-change: transform;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 48rem) {
    .prose h2 {
        font-size: 1.5em;
    }
    
    .prose h3 {
        font-size: 1.25em;
    }
    
    .prose {
        font-size: 0.9375rem;
    }
    
    .marquee-track {
        animation-duration: 20s;
    }
}

@media (max-width: 30rem) {
    .prose h2 {
        font-size: 1.375em;
    }
    
    .prose h3 {
        font-size: 1.125em;
    }
    
    .prose blockquote {
        padding: 0.75em 1em;
    }
    
    .prose th,
    .prose td {
        padding: 0.75em 1em;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .prose {
        color: #000000;
    }
    
    .prose a {
        color: #000000;
        text-decoration: underline;
    }
    
    .prose h2,
    .prose h3,
    .prose h4 {
        color: #000000;
    }
}
