/* ============================================
   IDEA CARNIVAL - PARTICLE EFFECT CONTAINERS
   Canvas-based particle overlays
   ============================================ */

:root {
    --gold: #D4AF37;
    --champagne: #F7E7CE;
    --black: #000000;
    --burgundy: #800020;
}

/* ============================================
   PARTICLE CANVAS CONTAINER
   ============================================ */

.particle-container {
    position: relative;
    overflow: hidden;
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle-canvas.interactive {
    pointer-events: auto;
}

.particle-content {
    position: relative;
    z-index: 2;
}

/* ============================================
   HERO SECTION WITH PARTICLES
   ============================================ */

.hero-with-particles {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    overflow: hidden;
}

.hero-with-particles .particle-canvas {
    z-index: 1;
}

.hero-with-particles .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 40px;
    max-width: 1200px;
}

/* ============================================
   SECTION WITH PARTICLES
   ============================================ */

.section-with-particles {
    position: relative;
    padding: 100px 40px;
    overflow: hidden;
}

.section-with-particles .particle-canvas {
    z-index: 0;
}

.section-with-particles .section-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   CARD WITH PARTICLES
   ============================================ */

.card-with-particles {
    position: relative;
    background: rgba(212, 175, 55, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 60px;
    overflow: hidden;
}

.card-with-particles .particle-canvas {
    z-index: 0;
    border-radius: 12px;
}

.card-with-particles .card-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   BUTTON WITH PARTICLE HOVER
   ============================================ */

.btn-with-particles {
    position: relative;
    overflow: hidden;
}

.btn-with-particles .particle-canvas {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-with-particles:hover .particle-canvas {
    opacity: 1;
}

/* ============================================
   MODAL/OVERLAY WITH PARTICLES
   ============================================ */

.modal-with-particles {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-with-particles .particle-canvas {
    z-index: 1;
}

.modal-with-particles .modal-content {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 60px;
    max-width: 800px;
    backdrop-filter: blur(10px);
}

/* ============================================
   FULLSCREEN PARTICLE BACKGROUND
   ============================================ */

.fullscreen-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}

.fullscreen-particles .particle-canvas {
    pointer-events: none;
}

/* ============================================
   PARTICLE INTENSITY VARIANTS
   ============================================ */

.particles-subtle .particle-canvas {
    opacity: 0.4;
}

.particles-medium .particle-canvas {
    opacity: 0.7;
}

.particles-intense .particle-canvas {
    opacity: 1;
}

/* ============================================
   PARTICLE CONTROL PANEL (Demo)
   ============================================ */

.particle-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 20px;
    z-index: 10000;
    min-width: 250px;
}

.particle-controls h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 15px;
}

.particle-controls button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gold);
    color: var(--champagne);
    font-family: 'Cinzel', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.particle-controls button:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateX(-5px);
}

.particle-controls button.active {
    background: var(--gold);
    color: var(--black);
}

.particle-controls .slider-control {
    margin-bottom: 15px;
}

.particle-controls .slider-control label {
    display: block;
    font-family: 'Cinzel', serif;
    color: var(--champagne);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.particle-controls .slider-control input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    outline: none;
}

.particle-controls .slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
}

.particle-controls .slider-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.particle-controls .toggle-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.particle-controls .toggle-control label {
    font-family: 'Cormorant Garamond', serif;
    color: var(--champagne);
    font-size: 14px;
}

.particle-controls .toggle-control input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
}

/* ============================================
   LOADING STATE
   ============================================ */

.particle-container.loading .particle-canvas {
    opacity: 0;
}

.particle-container.loaded .particle-canvas {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-with-particles .hero-content {
        padding: 40px 20px;
    }

    .section-with-particles {
        padding: 60px 20px;
    }

    .card-with-particles {
        padding: 40px 20px;
    }

    .particle-controls {
        bottom: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
    }

    /* Reduce particle density on mobile for performance */
    .particle-canvas {
        opacity: 0.7;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.particle-canvas {
    will-change: transform;
}

/* Disable particles for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .particle-canvas {
        display: none;
    }
}

/* Disable particles on low-end devices */
@media (max-width: 480px) {
    .particles-intense .particle-canvas {
        opacity: 0.5;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .particle-canvas,
    .particle-controls {
        display: none;
    }
}
