/* Legion Vanguard Core - Custom Styles */
/* ===================================== */

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

/* Animations & Keyframes */
/* ====================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 0 0 0.625rem rgba(212, 175, 55, 0);
    }
}

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

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

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-pulse-gold {
    animation: pulse-gold 2s infinite;
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Tilt Effect Transitions */
[data-tilt] {
    transition: transform 0.3s ease-out;
    transform-style: preserve-3d;
}

/* Parallax Base */
[data-parallax] {
    will-change: transform;
}

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

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

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

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

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

/* Headings */
.prose h2 {
    color: #e8e8f0;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding-bottom: 0.75rem;
    border-bottom: 0.125rem solid rgba(212, 175, 55, 0.3);
}

.prose h3 {
    color: #e8e8f0;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 1.375rem;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.prose h4 {
    color: #d4af37;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.prose p:first-of-type {
    font-size: 1.125rem;
    color: #e8e8f0;
}

/* Links */
.prose a {
    color: #d4af37;
    text-decoration: none;
    border-bottom: 0.0625rem solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

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

/* Strong & Emphasis */
.prose strong {
    color: #e8e8f0;
    font-weight: 600;
}

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

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

.prose ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.625rem;
    color: #c0c0d0;
}

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

/* Lists - Ordered */
.prose ol {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 0;
    list-style: none;
    counter-reset: prose-counter;
}

.prose ol li {
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 0.75rem;
    color: #c0c0d0;
    counter-increment: prose-counter;
}

.prose ol li::before {
    content: counter(prose-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, #d4af37, #f5c842);
    color: #0a0a0f;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

/* Blockquotes */
.prose blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #1a1a25, #12121a);
    border-left: 0.25rem solid #d4af37;
    border-radius: 0 0.5rem 0.5rem 0;
    position: relative;
}

.prose blockquote::before {
    content: '"';
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-size: 3rem;
    color: #d4af37;
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

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

/* Tables */
.prose .table-responsive {
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    overflow-x: auto;
    background: #1a1a25;
    border: 0.0625rem solid rgba(45, 45, 58, 0.5);
}

.prose table {
    width: 100%;
    min-width: 31.25rem;
    border-collapse: collapse;
}

.prose thead {
    background: rgba(45, 45, 58, 0.5);
}

.prose th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e8e8f0;
    border-bottom: 0.125rem solid rgba(212, 175, 55, 0.3);
}

.prose td {
    padding: 0.875rem 1.25rem;
    color: #c0c0d0;
    border-bottom: 0.0625rem solid rgba(45, 45, 58, 0.5);
}

.prose tbody tr:hover {
    background: rgba(45, 45, 58, 0.3);
}

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

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    border: 0.0625rem solid rgba(45, 45, 58, 0.5);
}

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

.prose pre {
    background: #1a1a25;
    border: 0.0625rem solid rgba(45, 45, 58, 0.5);
    border-radius: 0.5rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

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

/* First Paragraph Styling */
.prose > p:first-of-type::first-letter {
    float: left;
    font-size: 3.5rem;
    line-height: 1;
    padding-right: 0.5rem;
    padding-top: 0.25rem;
    color: #d4af37;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
}

/* Definition Lists */
.prose dl {
    margin: 1.5rem 0;
}

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

.prose dd {
    color: #c0c0d0;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

/* Figure & Figcaption */
.prose figure {
    margin: 1.5rem 0;
}

.prose figcaption {
    color: #8a8a9a;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 48rem) {
    .prose {
        font-size: 0.9375rem;
    }

    .prose h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .prose h3 {
        font-size: 1.25rem;
    }

    .prose > p:first-of-type::first-letter {
        font-size: 2.75rem;
    }

    .prose blockquote {
        padding: 1rem 1.25rem;
    }
}

/* Summary/Details (Accordion) */
.prose details {
    margin: 1rem 0;
    background: #1a1a25;
    border: 0.0625rem solid rgba(45, 45, 58, 0.5);
    border-radius: 0.5rem;
    overflow: hidden;
}

.prose summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    color: #e8e8f0;
    font-weight: 600;
    background: rgba(45, 45, 58, 0.3);
}

.prose summary:hover {
    background: rgba(45, 45, 58, 0.5);
}

.prose details[open] summary {
    border-bottom: 0.0625rem solid rgba(45, 45, 58, 0.5);
}

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

/* Override Utilities */
/* ================== */

/* Ensure proper contrast on all interactive elements */
.btn-primary {
    background: linear-gradient(135deg, #d4af37, #f5c842);
    color: #0a0a0f;
}

.btn-secondary {
    background: transparent;
    border: 0.125rem solid #2d2d3a;
    color: #c0c0d0;
}

.btn-secondary:hover {
    border-color: #d4af37;
    color: #d4af37;
}

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

.card-hover:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 1.25rem 2.5rem rgba(212, 175, 55, 0.15);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #d4af37, #f5c842);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Metallic Border Effect */
.metallic-border {
    border: 0.0625rem solid transparent;
    background: linear-gradient(#12121a, #12121a) padding-box,
                linear-gradient(135deg, #d4af37, #2d2d3a, #d4af37) border-box;
}

/* Glow Effects */
.glow-gold {
    box-shadow: 0 0 1.25rem rgba(212, 175, 55, 0.3);
}

.glow-gold-hover:hover {
    box-shadow: 0 0 1.875rem rgba(212, 175, 55, 0.5);
}

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

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

::-webkit-scrollbar-thumb {
    background: #2d2d3a;
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}

/* Selection */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #e8e8f0;
}

/* Focus States */
*:focus-visible {
    outline: 0.125rem solid #d4af37;
    outline-offset: 0.125rem;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Disable animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
