/* Interactive elements for Yoniverse.ai website */

/* Particle Animation */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle-bg {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle linear infinite;
}

/* Interactive Quantum Cards */
.quantum-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: var(--card-bg);
    padding: 30px;
    transition: all 0.5s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
}

.quantum-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.quantum-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.quantum-card:hover:before {
    transform: scaleX(1);
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    transition: all 0.5s ease;
}

.quantum-card:hover .card-icon {
    transform: scale(1.2);
    color: var(--accent-color);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: all 0.5s ease;
}

.quantum-card:hover .card-title {
    color: var(--secondary-color);
}

.card-description {
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.quantum-card.expanded .card-description {
    height: auto;
    opacity: 1;
    margin-top: 15px;
}

.card-toggle {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-toggle i {
    transition: all 0.3s ease;
}

.quantum-card.expanded .card-toggle {
    background: var(--secondary-color);
}

.quantum-card.expanded .card-toggle i {
    transform: rotate(45deg);
}

/* Interactive Timeline */
.quantum-timeline {
    position: relative;
    max-width: 1200px;
    margin: 50px auto;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 30px;
    box-sizing: border-box;
    transition: all 0.5s ease;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item:hover {
    transform: scale(1.05);
}

.timeline-content {
    position: relative;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.timeline-item:hover .timeline-content {
    background: rgba(40, 40, 80, 0.7);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.timeline-item:nth-child(odd) .timeline-content:after {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid var(--card-bg);
    transition: all 0.5s ease;
}

.timeline-item:nth-child(even) .timeline-content:after {
    content: '';
    position: absolute;
    top: 20px;
    left: -15px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid var(--card-bg);
    transition: all 0.5s ease;
}

.timeline-item:nth-child(odd):hover .timeline-content:after {
    border-left-color: rgba(40, 40, 80, 0.7);
}

.timeline-item:nth-child(even):hover .timeline-content:after {
    border-right-color: rgba(40, 40, 80, 0.7);
}

.timeline-dot {
    position: absolute;
    top: 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 2;
    transition: all 0.5s ease;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -45px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -45px;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background: var(--secondary-color);
    box-shadow: 0 0 20px var(--secondary-color);
}

/* Interactive Quantum Visualizer */
.quantum-visualizer {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 50px 0;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(10, 10, 26, 0.5);
}

.visualizer-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 2;
}

.visualizer-control {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.visualizer-control:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.visualizer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Interactive Energy Field */
.energy-field {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 50px 0;
    overflow: hidden;
    border-radius: 15px;
}

.field-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.field-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--secondary-color);
    opacity: 0.7;
    transition: all 0.5s ease;
}

.energy-field:hover .field-particle {
    animation: field-pulse 2s infinite alternate;
}

@keyframes field-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0.3;
    }
}

/* Interactive Quantum Quiz */
.quantum-quiz {
    max-width: 800px;
    margin: 50px auto;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.quiz-question {
    margin-bottom: 30px;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.quiz-option {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(138, 43, 226, 0.2);
}

.quiz-option.correct {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.quiz-option.incorrect {
    border-color: #F44336;
    background: rgba(244, 67, 54, 0.2);
}

.quiz-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

.quiz-feedback.correct {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    display: block;
}

.quiz-feedback.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #F44336;
    display: block;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 50px;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-dot {
        left: 5px !important;
        right: auto !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-content:after,
    .timeline-item:nth-child(even) .timeline-content:after {
        display: none;
    }
    
    .quantum-visualizer {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .quantum-card {
        margin-bottom: 30px;
    }
    
    .visualizer-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .quiz-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .quantum-visualizer {
        height: 250px;
    }
    
    .visualizer-control {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
}
