/* Candicabz Casino - Custom CSS */
/* Theme: Candicab Pop Drive Core */

/* ===== ROOT VARIABLES ===== */
:root {
    --candy-pink: #FF6B9D;
    --candy-purple: #9B5DE5;
    --candy-blue: #00BBF9;
    --candy-yellow: #FEE440;
    --candy-orange: #F15BB5;
    --candy-mint: #00F5D4;
    --dark-900: #0D0D1A;
    --dark-800: #1A1A2E;
    --dark-700: #252542;
}

/* ===== GLOBAL OVERFLOW CONTROL ===== */
html,
body {
    overflow-x: clip;
    overflow-y: auto;
}

/* ===== ANIMATIONS ===== */

/* Gradient Animation */
@keyframes gradient {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

.animate-gradient {
    animation: gradient 4s ease infinite;
}

/* Slow Bounce */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

/* Particle Float Animation */
@keyframes particle-float-1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translate(100px, -150px) rotate(90deg);
        opacity: 0.3;
    }
    50% {
        transform: translate(200px, 50px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translate(50px, 100px) rotate(270deg);
        opacity: 0.4;
    }
}

@keyframes particle-float-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    33% {
        transform: translate(-120px, -80px) scale(1.2);
        opacity: 0.7;
    }
    66% {
        transform: translate(80px, -120px) scale(0.8);
        opacity: 0.4;
    }
}

@keyframes particle-float-3 {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.4;
    }
    50% {
        transform: translate(-150px, 100px);
        opacity: 0.7;
    }
}

/* Particle Styles */
.particle-container {
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.particle-1 {
    width: 6rem;
    height: 6rem;
    background: radial-gradient(circle, var(--candy-pink) 0%, transparent 70%);
    top: 10%;
    left: 5%;
    animation: particle-float-1 20s ease-in-out infinite;
}

.particle-2 {
    width: 8rem;
    height: 8rem;
    background: radial-gradient(circle, var(--candy-purple) 0%, transparent 70%);
    top: 60%;
    right: 10%;
    animation: particle-float-2 25s ease-in-out infinite;
}

.particle-3 {
    width: 4rem;
    height: 4rem;
    background: radial-gradient(circle, var(--candy-blue) 0%, transparent 70%);
    bottom: 20%;
    left: 20%;
    animation: particle-float-3 18s ease-in-out infinite;
}

.particle-4 {
    width: 5rem;
    height: 5rem;
    background: radial-gradient(circle, var(--candy-yellow) 0%, transparent 70%);
    top: 30%;
    right: 25%;
    animation: particle-float-1 22s ease-in-out infinite reverse;
}

.particle-5 {
    width: 3rem;
    height: 3rem;
    background: radial-gradient(circle, var(--candy-mint) 0%, transparent 70%);
    bottom: 40%;
    right: 5%;
    animation: particle-float-2 15s ease-in-out infinite;
}

.particle-6 {
    width: 7rem;
    height: 7rem;
    background: radial-gradient(circle, var(--candy-orange) 0%, transparent 70%);
    top: 70%;
    left: 40%;
    animation: particle-float-3 28s ease-in-out infinite reverse;
}

/* Tilt Card Base */
.tilt-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

/* Nav Link Hover Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--candy-pink), var(--candy-purple));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hide Scrollbar for Horizontal Scroll */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

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

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== PROSE STYLING ===== */
.prose {
    color: #E5E7EB;
    font-size: 1rem;
    line-height: 1.75;
}

/* Headings */
.prose h2 {
    color: #F9FAFB;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.75em;
    margin-top: 2.5em;
    margin-bottom: 1em;
    line-height: 1.3;
    padding-bottom: 0.5em;
    border-bottom: 2px solid rgba(155, 93, 229, 0.3);
    background: linear-gradient(90deg, var(--candy-pink), var(--candy-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prose h3 {
    color: var(--candy-mint);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.375em;
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.4;
}

.prose h4 {
    color: var(--candy-yellow);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.125em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

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

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

/* Links */
.prose a {
    color: var(--candy-pink);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.prose a:hover {
    color: var(--candy-yellow);
    border-bottom-color: var(--candy-yellow);
}

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

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

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.625em;
    width: 0.5em;
    height: 0.5em;
    background: linear-gradient(135deg, var(--candy-pink), var(--candy-purple));
    border-radius: 50%;
}

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

.prose ol li {
    position: relative;
    padding-left: 2.5em;
    margin-bottom: 0.75em;
    counter-increment: prose-counter;
    color: #D1D5DB;
}

.prose ol li::before {
    content: counter(prose-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75em;
    height: 1.75em;
    background: linear-gradient(135deg, var(--candy-purple), var(--candy-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 700;
    color: #fff;
    line-height: 1.75em;
    text-align: center;
}

/* Tables */
.prose .table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5em;
    border-radius: 0.75rem;
    border: 1px solid rgba(155, 93, 229, 0.2);
}

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

.prose thead {
    background: linear-gradient(135deg, rgba(155, 93, 229, 0.2), rgba(0, 187, 249, 0.1));
}

.prose th {
    padding: 1em;
    text-align: left;
    font-weight: 600;
    color: var(--candy-yellow);
    font-family: 'Poppins', sans-serif;
    font-size: 0.875em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(155, 93, 229, 0.3);
}

.prose td {
    padding: 1em;
    color: #D1D5DB;
    border-bottom: 1px solid rgba(155, 93, 229, 0.1);
}

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

.prose tbody tr:hover {
    background: rgba(155, 93, 229, 0.05);
}

/* Blockquotes */
.prose blockquote {
    margin: 1.5em 0;
    padding: 1.25em 1.5em;
    background: linear-gradient(135deg, rgba(155, 93, 229, 0.1), rgba(255, 107, 157, 0.05));
    border-left: 4px solid var(--candy-purple);
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    color: #E5E7EB;
}

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

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2em auto;
    display: block;
    box-shadow: 0 10px 40px rgba(155, 93, 229, 0.2);
    border: 1px solid rgba(155, 93, 229, 0.2);
}

/* Code */
.prose code {
    background: rgba(155, 93, 229, 0.15);
    color: var(--candy-mint);
    padding: 0.2em 0.4em;
    border-radius: 0.375rem;
    font-size: 0.875em;
    font-family: 'Monaco', 'Consolas', monospace;
}

.prose pre {
    background: var(--dark-800);
    padding: 1.25em;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid rgba(155, 93, 229, 0.2);
}

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

/* Horizontal Rule */
.prose hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--candy-purple), transparent);
    margin: 3em 0;
}

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

.prose em {
    color: var(--candy-mint);
    font-style: italic;
}

/* Definition Lists */
.prose dl {
    margin-bottom: 1.5em;
}

.prose dt {
    font-weight: 600;
    color: var(--candy-pink);
    margin-top: 1em;
}

.prose dd {
    margin-left: 1.5em;
    color: #D1D5DB;
}

/* Figure Captions */
.prose figcaption {
    text-align: center;
    font-size: 0.875em;
    color: #9CA3AF;
    margin-top: 0.75em;
    font-style: italic;
}

/* Ensure proper spacing for first/last elements */
.prose > *:first-child {
    margin-top: 0;
}

.prose > *:last-child {
    margin-bottom: 0;
}

/* ===== BUTTON GLOW EFFECTS ===== */
.cta-btn-primary:hover {
    box-shadow: 0 0 30px rgba(254, 228, 64, 0.4), 0 0 60px rgba(254, 228, 64, 0.2);
}

.cta-btn-secondary:hover {
    box-shadow: 0 0 20px rgba(0, 187, 249, 0.3);
}

/* ===== DETAILS/SUMMARY STYLING ===== */
details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    border-bottom: 1px solid rgba(155, 93, 229, 0.2);
}

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--candy-purple);
    color: #fff;
}

::-moz-selection {
    background: var(--candy-purple);
    color: #fff;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose h2 {
        font-size: 1.5em;
    }
    
    .prose h3 {
        font-size: 1.25em;
    }
    
    .prose table {
        font-size: 0.875em;
    }
    
    .prose th,
    .prose td {
        padding: 0.75em;
    }
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
a:focus,
button:focus,
summary:focus {
    outline: 2px solid var(--candy-purple);
    outline-offset: 2px;
}

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