/* ======================
   ANIMATIONS & KEYFRAMES
   ====================== */

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(224, 17, 95, 0.8);
    }
}

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

@keyframes mist-drift {
    0% {
        transform: translateX(-100%);
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(100%);
        opacity: 0.3;
    }
}

/* ======================
   CUSTOM COMPONENTS
   ====================== */

.glow-box {
    animation: pulse-glow 3s ease-in-out infinite;
}

.game-card {
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(224, 17, 95, 0.3);
}

/* Particle Container */
.particle-container {
    pointer-events: none;
    overflow: hidden;
}

.particle-container::before,
.particle-container::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(192, 192, 192, 0.8);
    border-radius: 50%;
    animation: particle-float 15s linear infinite;
}

.particle-container::before {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.particle-container::after {
    left: 80%;
    animation-delay: 5s;
    animation-duration: 25s;
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

/* ======================
   PROSE STYLING
   ====================== */

.prose {
    color: rgba(192, 192, 192, 0.9);
    max-width: 100%;
}

/* Headings */
.prose h2 {
    color: #E0115F;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.prose h3 {
    color: #C0C0C0;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.prose h4 {
    color: #C0C0C0;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Paragraphs */
.prose p {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: rgba(192, 192, 192, 0.85);
}

.prose p:first-of-type {
    font-size: 1.125rem;
    color: rgba(192, 192, 192, 0.95);
}

/* Links */
.prose a {
    color: #E0115F;
    text-decoration: none;
    border-bottom: 1px solid rgba(224, 17, 95, 0.3);
    transition: all 0.2s ease;
}

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

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

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

.prose ul li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: rgba(192, 192, 192, 0.85);
}

.prose ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #E0115F;
    font-weight: 700;
    font-size: 1.25rem;
}

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

.prose ol li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: rgba(192, 192, 192, 0.85);
    counter-increment: list-counter;
}

.prose ol li::before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    color: #E0115F;
    font-weight: 700;
}

/* Tables */
.prose table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    margin-bottom: 2rem;
    background-color: rgba(26, 26, 26, 0.5);
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: 0.5rem;
    overflow: hidden;
}

.prose thead {
    background-color: rgba(139, 0, 0, 0.2);
}

.prose th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 700;
    color: #E0115F;
    border-bottom: 2px solid rgba(139, 0, 0, 0.3);
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prose td {
    padding: 1rem 1.5rem;
    color: rgba(192, 192, 192, 0.85);
    border-bottom: 1px solid rgba(139, 0, 0, 0.2);
    font-size: 0.9375rem;
}

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

.prose tbody tr:hover {
    background-color: rgba(139, 0, 0, 0.1);
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #E0115F;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: rgba(192, 192, 192, 0.9);
    background-color: rgba(26, 26, 26, 0.3);
    padding: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

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

/* Strong/Bold */
.prose strong {
    color: #C0C0C0;
    font-weight: 700;
}

/* Emphasis/Italic */
.prose em {
    font-style: italic;
    color: rgba(224, 17, 95, 0.9);
}

/* Code */
.prose code {
    background-color: rgba(26, 26, 26, 0.5);
    color: #E0115F;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.prose pre {
    background-color: rgba(26, 26, 26, 0.5);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(139, 0, 0, 0.3);
}

.prose pre code {
    background: none;
    padding: 0;
    color: #C0C0C0;
}

/* Horizontal Rule */
.prose hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(139, 0, 0, 0.5), transparent);
    margin: 3rem 0;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 0, 0, 0.3);
}

/* Figure */
.prose figure {
    margin: 2rem 0;
}

.prose figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(192, 192, 192, 0.6);
    margin-top: 0.75rem;
    font-style: italic;
}

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

@media (max-width: 768px) {
    .prose h2 {
        font-size: 1.75rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .prose h3 {
        font-size: 1.375rem;
        margin-top: 1.5rem;
    }
    
    .prose h4 {
        font-size: 1.125rem;
    }
    
    .prose p {
        font-size: 1rem;
    }
    
    .prose th,
    .prose td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .prose ul li,
    .prose ol li {
        padding-left: 1.75rem;
        font-size: 0.9375rem;
    }
    
    .prose blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
    }
}

/* ======================
   ACCESSIBILITY
   ====================== */

.prose :focus {
    outline: 2px solid #E0115F;
    outline-offset: 2px;
}

.prose a:focus {
    outline: 2px solid #E0115F;
    outline-offset: 4px;
}

/* High contrast improvements */
@media (prefers-contrast: high) {
    .prose {
        color: #FFFFFF;
    }
    
    .prose p,
    .prose li,
    .prose td {
        color: rgba(255, 255, 255, 0.95);
    }
    
    .prose h2,
    .prose h3 {
        color: #FFFFFF;
    }
}
