/* ============================================
   Lasting Win Casino - Custom Styles
   Theme: Calm (clean typography, steady rhythm)
   ============================================ */

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

/* ============================================
   Animations - Keyframes
   ============================================ */

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

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

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

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

/* Duplicate items for seamless loop */
.marquee-track::after {
    content: '';
    display: flex;
}

/* Tilt Animation */
@keyframes tilt {
    0%, 100% {
        transform: rotate(-1deg) scale(1);
    }
    50% {
        transform: rotate(1deg) scale(1.02);
    }
}

.tilt-animation {
    animation: tilt 4s ease-in-out infinite;
}

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

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

/* Pulse Animation for CTAs */
@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(232, 185, 35, 0.4);
    }
    50% {
        box-shadow: 0 0 0 0.625rem rgba(232, 185, 35, 0);
    }
}

.pulse-cta {
    animation: pulse-subtle 2s infinite;
}

/* ============================================
   Table Responsive Wrapper
   ============================================ */

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

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

/* ============================================
   Prose Styling for Markdown Content
   ============================================ */

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

/* Headings */
.prose h2 {
    color: #1e3a5f;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8b923;
}

.prose h3 {
    color: #2d5a87;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose h4 {
    color: #1e3a5f;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs */
.prose p {
    margin-bottom: 1.25rem;
    color: #374151;
}

.prose p:first-of-type {
    font-size: 1.1rem;
    color: #1a2332;
}

/* Links */
.prose a {
    color: #2d5a87;
    text-decoration: underline;
    text-decoration-color: #e8b923;
    text-underline-offset: 0.25rem;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

/* Lists */
.prose ul,
.prose ol {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    color: #374151;
}

.prose li::marker {
    color: #e8b923;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #e8b923;
    background-color: #f5f7fa;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4b5563;
    border-radius: 0 0.5rem 0.5rem 0;
}

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

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

/* Tables */
.prose table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.prose thead {
    background-color: #1e3a5f;
    color: #ffffff;
}

.prose th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.prose td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

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

.prose tbody tr:hover {
    background-color: #f0f4f8;
}

/* Ensure tables scroll on mobile */
.prose .table-responsive,
.prose div:has(> table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

/* Code */
.prose code {
    background-color: #f3f4f6;
    color: #1e3a5f;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', 'Monaco', monospace;
}

.prose pre {
    background-color: #1e3a5f;
    color: #f3f4f6;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Horizontal Rules */
.prose hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2.5rem 0;
}

/* Strong and Emphasis */
.prose strong {
    color: #1e3a5f;
    font-weight: 600;
}

.prose em {
    font-style: italic;
    color: #4b5563;
}

/* First letter styling */
.prose > p:first-of-type::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
    color: #1e3a5f;
}

/* ============================================
   Mobile Specific Styles
   ============================================ */

@media (max-width: 640px) {
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose h2 {
        margin-top: 2rem;
    }
    
    .prose h3 {
        margin-top: 1.5rem;
    }
    
    .prose table {
        font-size: 0.8125rem;
    }
    
    .prose th,
    .prose td {
        padding: 0.625rem 0.75rem;
    }
    
    .prose > p:first-of-type::first-letter {
        font-size: 2.5rem;
    }
}

/* ============================================
   Game Card Hover Effects
   ============================================ */

.game-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.game-card img {
    transition: transform 0.4s ease;
}

.game-card:hover img {
    transform: scale(1.05);
}

/* ============================================
   Scrollbar Styling
   ============================================ */

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

::-webkit-scrollbar-track {
    background: #f5f7fa;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ============================================
   Focus States for Accessibility
   ============================================ */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #e8b923;
    outline-offset: 2px;
}

/* ============================================
   Selection Styling
   ============================================ */

::selection {
    background-color: #e8b923;
    color: #1e3a5f;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .prose {
        color: #000;
        font-size: 12pt;
    }
    
    .prose a {
        color: #000;
        text-decoration: underline;
    }
    
    .prose table {
        page-break-inside: avoid;
    }
}
