/* Particle Background Animation */
.particle-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle-bg::before,
.particle-bg::after {
    content: '';
    position: absolute;
    width: 2rem;
    height: 2rem;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: particle-float 8s infinite ease-in-out;
}

.particle-bg::before {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.particle-bg::after {
    top: 60%;
    right: 15%;
    animation-delay: 3s;
    width: 3rem;
    height: 3rem;
}

@keyframes particle-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(2rem, -3rem) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translate(-1rem, 2rem) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(3rem, 1rem) scale(1.1);
        opacity: 0.5;
    }
}

/* Tilt Animation */
.tilt-element {
    animation: tilt 3s ease-in-out infinite;
}

@keyframes tilt {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-1deg);
    }
    75% {
        transform: rotate(1deg);
    }
}

/* Prose Styling for Markdown Content */
.prose {
    color: #e5e7eb;
    max-width: 100%;
}

.prose h2 {
    color: #d4af37;
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prose h2::before {
    content: '';
    display: inline-block;
    width: 0.25rem;
    height: 1.5em;
    background: linear-gradient(to bottom, #d4af37, #c5a028);
    border-radius: 0.25rem;
}

.prose h3 {
    color: #d4af37;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.75em;
    margin-bottom: 0.875em;
    line-height: 1.4;
}

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

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    line-height: 1.75;
    color: #d1d5db;
}

.prose a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #c5a028;
    text-decoration: underline;
}

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

.prose ul,
.prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.75em;
}

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

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

.prose li {
    margin-top: 0.625em;
    margin-bottom: 0.625em;
    line-height: 1.75;
    color: #d1d5db;
}

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

.prose blockquote {
    font-style: italic;
    border-left: 0.25rem solid #d4af37;
    padding-left: 1.5em;
    margin: 1.75em 0;
    color: #9ca3af;
    background: rgba(6, 95, 70, 0.2);
    padding-top: 1em;
    padding-bottom: 1em;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2em auto;
    display: block;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    overflow-x: auto;
    display: block;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 0.75rem;
}

.prose thead {
    background: linear-gradient(to right, #065f46, #047857);
}

.prose th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #d4af37;
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
}

.prose td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: #d1d5db;
}

.prose tbody tr {
    transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
    background: rgba(6, 95, 70, 0.3);
}

.prose code {
    background: rgba(6, 95, 70, 0.4);
    padding: 0.25em 0.5em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.prose pre {
    background: rgba(6, 95, 70, 0.4);
    padding: 1.25em;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.75em 0;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 0.625rem;
    height: 0.625rem;
}

::-webkit-scrollbar-track {
    background: #064e3b;
}

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

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

/* Responsive Typography */
@media (max-width: 768px) {
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose h4 {
        font-size: 1.125rem;
    }
    
    .prose table {
        font-size: 0.875rem;
    }
    
    .prose th,
    .prose td {
        padding: 0.625rem 0.75rem;
    }
}

/* Link Back to Home Styling */
.prose p:first-of-type a[href="/"] {
    color: #d4af37;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.prose p:first-of-type a[href="/"]:hover {
    border-bottom-color: #d4af37;
}
