/* ============================================
   CHAOS PAGE STYLES
   Vibrant/Disordered Theme - Creative Psychology
   ============================================ */

.chaos-page {
    background: #1a001a;
    color: #fff;
}

/* Intro Overlay */
.chaos-intro {
    background: #0d000d;
    overflow: hidden;
}

.chaos-fragments {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 68, 255, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 204, 68, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(68, 204, 255, 0.2) 0%, transparent 40%);
    animation: fragmentShift 5s ease infinite;
}

@keyframes fragmentShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    33% { transform: scale(1.1) rotate(5deg); }
    66% { transform: scale(0.95) rotate(-5deg); }
}

.chaos-text {
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ff44ff, #ffcc44, #44ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
    animation: chaosText 3s ease infinite;
}

@keyframes chaosText {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.chaos-subtext {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-top: 1rem;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

/* Progress Bar */
.chaos-progress {
    background: linear-gradient(90deg, #ff44ff, #ffcc44, #44ccff, #ff44ff);
    background-size: 200% 100%;
    animation: chaosProgress 3s linear infinite;
}

@keyframes chaosProgress {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Navigation */
.chaos-nav .nav-links a.active {
    color: #ff44ff;
}

.chaos-nav .nav-links a.active::after {
    background: linear-gradient(90deg, #ff44ff, #ffcc44);
}

/* Background */
.chaos-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

#chaosCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Hero Section */
.chaos-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(255, 68, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 204, 68, 0.2) 0%, transparent 50%);
}

.chaos-icon {
    font-size: 5rem;
    background: linear-gradient(135deg, #ff44ff, #ffcc44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: chaosSpin 4s ease infinite;
}

@keyframes chaosSpin {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.1); }
}

.chaos-hero .hero-title {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    letter-spacing: 1rem;
    background: linear-gradient(135deg, #ff44ff, #ffcc44, #44ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.chaos-hero .hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.8;
    max-width: 500px;
    text-align: center;
    margin-bottom: 2rem;
}

.chaos-quote {
    text-align: center;
    padding: 2rem;
    border-left: 3px solid #ff44ff;
    background: rgba(255, 68, 255, 0.05);
}

.chaos-quote span {
    font-size: 1.5rem;
    font-style: italic;
    display: block;
    margin-bottom: 0.5rem;
}

.chaos-quote cite {
    font-size: 0.9rem;
    opacity: 0.6;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
    animation: fadeInUp 1s ease 1s both;
}

.scroll-indicator i {
    animation: bounce 1.5s ease infinite;
}

/* Explanation Section */
.explanation-section {
    padding: 8rem 2rem;
}

.explanation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.explanation-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.chaos-concepts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.concept-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 68, 255, 0.1);
    border-left: 3px solid #ff44ff;
    border-radius: 0 0.5rem 0.5rem 0;
}

.concept-item i {
    color: #ff44ff;
    font-size: 1.25rem;
}

.concept-item strong {
    display: block;
    color: #ff44ff;
}

.concept-item span {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Attractor Visual */
.attractor-visual {
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#attractorCanvas {
    width: 100%;
    height: 100%;
}

/* Experiment Section */
.experiment-section {
    padding: 8rem 2rem;
}

.experiment-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 4rem auto 0;
}

.chaos-simulator {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 68, 255, 0.3);
    border-radius: 1rem;
    padding: 2rem;
}

.simulator-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 68, 255, 0.2);
}

.control-group {
    flex: 1;
    min-width: 150px;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: #ff44ff;
}

.control-group input[type="range"] {
    width: 100%;
    height: 8px;
    background: rgba(255, 68, 255, 0.2);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff44ff, #ffcc44);
    border-radius: 50%;
    cursor: pointer;
}

.reset-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 68, 255, 0.2);
    border: 2px solid rgba(255, 68, 255, 0.5);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-btn:hover {
    background: rgba(255, 68, 255, 0.3);
}

#chaosSimCanvas {
    width: 100%;
    height: 250px;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
}

.simulator-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 68, 255, 0.05);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Chaos Info */
.chaos-info h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ff44ff;
}

.signs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sign-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 68, 255, 0.05);
    border-radius: 0.5rem;
    border-left: 3px solid rgba(255, 68, 255, 0.3);
}

.sign-item i {
    color: #ff44ff;
    font-size: 1.25rem;
}

/* Stats Section */
.stats-section {
    padding: 6rem 2rem;
}

.chaos-page .stat-item {
    background: rgba(255, 68, 255, 0.05);
    border: 1px solid rgba(255, 68, 255, 0.2);
}

.chaos-page .stat-number {
    background: linear-gradient(135deg, #ff44ff, #ffcc44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Case Study */
.case-study-section {
    padding: 8rem 2rem;
}

.chaos-case {
    background: rgba(255, 68, 255, 0.03);
    border: 1px solid rgba(255, 68, 255, 0.15);
}

.chaos-case .case-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 68, 255, 0.2);
    color: #ff44ff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.chaos-case .case-lessons h4 {
    color: #ff44ff;
    margin-bottom: 1rem;
}

/* Creativity Visual */
.creativity-visual {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

.idea-bubble {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff44ff, #ffcc44);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    animation: bubbleFloat 3s ease infinite;
}

.bubble-1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.bubble-2 { top: 50%; right: 0; transform: translateY(-50%); animation-delay: 0.5s; }
.bubble-3 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 1s; }
.bubble-4 { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 1.5s; }

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.connection-web {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.connection-web svg {
    width: 100%;
    height: 100%;
}

.web-line {
    fill: none;
    stroke: rgba(255, 68, 255, 0.3);
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
    to { stroke-dashoffset: -10; }
}

/* Challenge Section */
.challenge-section {
    padding: 8rem 2rem;
}

.challenge-simulator {
    max-width: 700px;
    margin: 4rem auto 0;
}

.chaos-arena {
    position: relative;
    height: 350px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 68, 255, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.chaos-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.chaos-element {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff44ff, #ffcc44);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    animation: chaosDrift 4s ease infinite;
    animation-delay: var(--delay);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chaos-element:hover {
    transform: scale(1.2);
}

@keyframes chaosDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(90deg); }
    50% { transform: translate(-10px, 10px) rotate(180deg); }
    75% { transform: translate(-20px, -10px) rotate(270deg); }
}

.calm-zone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(68, 255, 136, 0.3) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    color: #44ff88;
    border: 2px solid rgba(68, 255, 136, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.calm-zone:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: radial-gradient(circle, rgba(68, 255, 136, 0.5) 0%, transparent 70%);
}

.chaos-tips {
    padding: 2rem;
    background: rgba(68, 255, 136, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(68, 255, 136, 0.2);
}

.chaos-tips h4 {
    color: #44ff88;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chaos-tips ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chaos-tips li {
    padding-left: 1.5rem;
    position: relative;
}

.chaos-tips li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #44ff88;
}

/* Concepts Section */
.concepts-section {
    padding: 8rem 2rem;
}

.chaos-page .concept-card {
    background: rgba(255, 68, 255, 0.03);
    border: 1px solid rgba(255, 68, 255, 0.15);
}

.chaos-page .concept-card:hover {
    border-color: rgba(255, 68, 255, 0.4);
    box-shadow: 0 20px 40px rgba(255, 68, 255, 0.15);
}

.chaos-page .concept-card h3 {
    color: #ff44ff;
}

/* CTA Section */
.chaos-cta-section {
    position: relative;
    background: linear-gradient(180deg, #150015 0%, #000000 100%);
    overflow: hidden;
}

.chaos-vortex {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: 
        radial-gradient(circle, rgba(255, 68, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle, rgba(255, 204, 68, 0.2) 30%, transparent 60%),
        radial-gradient(circle, rgba(68, 204, 255, 0.2) 50%, transparent 70%);
    animation: vortexSpin 20s linear infinite;
    pointer-events: none;
}

@keyframes vortexSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.chaos-cta-section .cta-title {
    background: linear-gradient(135deg, #ff44ff, #ffcc44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.cta-secondary {
    background: transparent;
    border: 2px solid rgba(255, 68, 255, 0.5);
}

.cta-secondary::before {
    background: rgba(255, 68, 255, 0.1);
}

.cta-secondary:hover {
    color: #ff44ff;
}

/* Footer */
.chaos-footer {
    border-top: 1px solid rgba(255, 68, 255, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .explanation-grid,
    .experiment-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .attractor-visual {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .simulator-controls {
        flex-direction: column;
    }
    
    .chaos-element {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .calm-zone {
        width: 100px;
        height: 100px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
