/* BotSpins Digital Pulse Flow - Custom CSS */
/* Animations, Overrides & Prose Styling */

/* ============================
   Particle Animation System
   ============================ */
.particle-container {
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 0.375rem;
    height: 0.375rem;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    border-radius: 50%;
    opacity: 0.4;
    animation: particle-float 20s infinite ease-in-out;
}

.particle-1 {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.particle-2 {
    top: 25%;
    left: 75%;
    animation-delay: -3s;
    animation-duration: 22s;
}

.particle-3 {
    top: 60%;
    left: 25%;
    animation-delay: -6s;
    animation-duration: 20s;
}

.particle-4 {
    top: 45%;
    left: 85%;
    animation-delay: -9s;
    animation-duration: 24s;
}

.particle-5 {
    top: 80%;
    left: 45%;
    animation-delay: -12s;
    animation-duration: 19s;
}

.particle-6 {
    top: 15%;
    left: 55%;
    animation-delay: -15s;
    animation-duration: 21s;
}

@keyframes particle-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(3.125rem, -1.875rem) scale(1.2);
        opacity: 0.5;
    }
    50% {
        transform: translate(-1.25rem, 2.5rem) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(1.875rem, 1.25rem) scale(1.1);
        opacity: 0.6;
    }
}

/* ============================
   Tilt Animation
   ============================ */
.tilt-element {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    transform-style: preserve-3d;
}

.tilt-element:hover {
    transform: perspective(62.5rem) rotateX(2deg) rotateY(-2deg) translateY(-0.25rem);
    box-shadow: 0 1.25rem 2.5rem -0.625rem rgba(99, 102, 241, 0.2);
}

/* ============================
   Pulse Animation
   ============================ */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* ============================
   Table Responsive Wrapper
   ============================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
}

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

/* ============================
   Smooth Scrollbar Styling
   ============================ */
::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

::-webkit-scrollbar-track {
    background: #0a0a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6, #6366f1);
}

/* ============================
   Details/Summary FAQ Styling
   ============================ */
details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

/* ============================
   Prose Styling for Content
   ============================ */
.prose {
    color: #e2e8f0;
    line-height: 1.7;
    font-size: 1rem;
}

.prose h2 {
    color: #ffffff;
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    line-height: 1.3;
}

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

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

.prose p {
    margin-bottom: 1.25rem;
    color: #94a3b8;
    line-height: 1.75;
}

.prose a {
    color: #06b6d4;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.prose a:hover {
    color: #22d3ee;
    border-bottom-color: #22d3ee;
}

.prose strong {
    color: #ffffff;
    font-weight: 600;
}

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

/* Prose Lists */
.prose ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.prose ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.625rem;
    color: #94a3b8;
    line-height: 1.6;
}

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

.prose ol {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
    counter-reset: list-counter;
}

.prose ol li {
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 0.75rem;
    color: #94a3b8;
    line-height: 1.6;
    counter-increment: list-counter;
}

.prose ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
}

/* Prose Blockquotes */
.prose blockquote {
    border-left: 0.25rem solid #6366f1;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
    color: #cbd5e1;
    font-style: italic;
    margin-bottom: 0;
}

/* Prose Tables */
.prose .table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.prose table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.prose thead {
    background: rgba(99, 102, 241, 0.2);
}

.prose th {
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    white-space: nowrap;
}

.prose td {
    color: #94a3b8;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(26, 26, 46, 0.8);
}

.prose tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

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

/* Prose Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Prose Code */
.prose code {
    background: rgba(99, 102, 241, 0.2);
    color: #06b6d4;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', 'Monaco', monospace;
}

.prose pre {
    background: #1a1a2e;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

/* Prose Horizontal Rule */
.prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
    margin: 2.5rem 0;
}

/* ============================
   Mobile Adjustments
   ============================ */
@media (max-width: 640px) {
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose h2 {
        margin-top: 2rem;
    }
    
    .prose h3 {
        margin-top: 1.5rem;
    }
    
    .prose ul li,
    .prose ol li {
        padding-left: 1.5rem;
    }
    
    .prose ol li::before {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.625rem;
    }
    
    .prose table {
        font-size: 0.8125rem;
    }
    
    .prose th,
    .prose td {
        padding: 0.625rem 0.75rem;
    }
}

/* ============================
   Focus States for Accessibility
   ============================ */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* ============================
   Selection Styling
   ============================ */
::selection {
    background: rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

/* ============================
   Card Hover Effects
   ============================ */
.game-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card-hover:hover {
    transform: translateY(-0.375rem);
    box-shadow: 0 1.5rem 3rem -0.75rem rgba(99, 102, 241, 0.25);
}

/* ============================
   Gradient Text Utility
   ============================ */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================
   Glow Effects
   ============================ */
.glow-primary {
    box-shadow: 0 0 1.25rem rgba(99, 102, 241, 0.3);
}

.glow-accent {
    box-shadow: 0 0 1.25rem rgba(6, 182, 212, 0.3);
}

/* ============================
   Print Styles
   ============================ */
@media print {
    .particle-container,
    .tilt-element:hover {
        animation: none !important;
        transform: none !important;
    }
    
    .prose {
        color: #000;
    }
    
    .prose h2,
    .prose h3,
    .prose h4 {
        color: #000;
    }
    
    .prose a {
        color: #000;
        text-decoration: underline;
    }
}
