/* Flickering Shape Effect Component - EXACT implementation from flickering-shape-effect.md */

/* Hero Container */
.flickering-hero-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

/* Grid Wrapper */
.flickering-grid-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas Styles */
.flickering-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Content Overlay */
.flickering-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 2rem;
}

.flickering-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.3);
    }
}

.flickering-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.flickering-cta-button {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flickering-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    background: linear-gradient(45deg, #ff5252, #d63031);
}

.flickering-cta-button:active {
    transform: translateY(0);
}

/* Demo Controls */
.flickering-controls {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    z-index: 10;
    min-width: 250px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.control-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.control-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.control-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.control-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.control-color {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.control-color::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

.control-group span {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .flickering-title {
        font-size: 2.5rem;
    }
    
    .flickering-description {
        font-size: 1rem;
    }
    
    .flickering-content {
        padding: 1rem;
    }
    
    .flickering-controls {
        position: static;
        transform: none;
        margin: 2rem auto;
        max-width: 300px;
        right: auto;
        top: auto;
    }
    
    .flickering-hero-container {
        min-height: auto;
        padding-bottom: 2rem;
    }
    
    .flickering-grid-wrapper {
        height: 70vh;
        min-height: 500px;
    }
}

@media (max-width: 480px) {
    .flickering-title {
        font-size: 2rem;
    }
    
    .flickering-description {
        font-size: 0.9rem;
    }
    
    .flickering-cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .flickering-controls {
        padding: 1rem;
        min-width: 200px;
    }
}

/* Loading Animation */
.flickering-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    z-index: 3;
}

.flickering-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Performance Optimizations */
.flickering-canvas {
    will-change: transform;
    transform: translateZ(0);
}

.flickering-content {
    will-change: transform;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .flickering-title {
        animation: none;
    }
    
    .flickering-cta-button {
        transition: none;
    }
    
    .flickering-loading::after {
        animation: none;
    }
}

/* Focus States */
.flickering-cta-button:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.control-slider:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.control-color:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}
