/**
 * 2Much Colossus AI - Animation Styles
 * Rapid Thinking animation for AI processing indicators
 */

/* Color Variables */
:root {
    --colossus-purple: #a855f7;
    --colossus-cyan: #06b6d4;
    --colossus-gold: #f59e0b;
    --colossus-bg: #1a1a2e;
    --colossus-bg-light: #16213e;
}

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

/* Modal zoom and blur animations */
@keyframes colossusModalZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes colossusModalBackdropIn {
    0% {
        backdrop-filter: blur(0px);
        background-color: rgba(0,0,0,0);
    }
    100% {
        backdrop-filter: blur(8px);
        background-color: rgba(0,0,0,0.6);
    }
}

@keyframes colossusDeepZoom {
    0%, 100% { transform: scale(0.3); }
    50% { transform: scale(2.2); }
}

@keyframes colossusOrbit1 {
    from { transform: rotate(0deg) translateX(40px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(40px) rotate(-360deg); }
}

@keyframes colossusOrbit2 {
    from { transform: rotate(60deg) translateX(55px) rotate(-60deg); }
    to { transform: rotate(420deg) translateX(55px) rotate(-420deg); }
}

@keyframes colossusOrbit3 {
    from { transform: rotate(120deg) translateX(70px) rotate(-120deg); }
    to { transform: rotate(480deg) translateX(70px) rotate(-480deg); }
}

@keyframes colossusHelixSpin {
    0%, 100% { transform: translateX(-30px); }
    50% { transform: translateX(18px); }
}

@keyframes colossusHelixSpinReverse {
    0%, 100% { transform: translateX(18px); }
    50% { transform: translateX(-30px); }
}

@keyframes colossusWaveProcess {
    0%, 100% { height: 20px; opacity: 0.5; }
    50% { height: 80px; opacity: 1; }
}

@keyframes colossusCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes colossusInfinityLeft {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes colossusInfinityRight {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes colossusMiniInfinityMove {
    0% { top: 8px; left: 20px; }
    25% { top: 28px; left: 5px; }
    50% { top: 8px; left: 50px; }
    75% { top: 28px; left: 87px; }
    100% { top: 8px; left: 20px; }
}

@keyframes colossusProteusRotate {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes colossusPoteusPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; box-shadow: 0 0 30px var(--colossus-purple); }
}

/* ==================== RAPID THINKING CONTAINER ==================== */

.colossus-thinking-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: visible;
}

.colossus-rapid-thinking {
    position: relative;
    width: 160px;
    height: 160px;
    animation: colossusDeepZoom 12s ease-in-out infinite;
}

.colossus-rapid-thinking .thought {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

.colossus-rapid-thinking .thought.active {
    opacity: 1;
}

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

/* Particles */
.colossus-rapid-thinking .mini-particles {
    position: relative;
    width: 100px;
    height: 100px;
}

.colossus-rapid-thinking .mini-particle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--colossus-gold);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--colossus-gold);
}

.colossus-rapid-thinking .mini-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--colossus-purple);
    border-radius: 50%;
    top: 50%;
    left: 50%;
}

.colossus-rapid-thinking .mini-particle-1 { animation: colossusOrbit1 2s linear infinite; }
.colossus-rapid-thinking .mini-particle-2 { animation: colossusOrbit2 2.5s linear infinite; }
.colossus-rapid-thinking .mini-particle-3 { animation: colossusOrbit3 3s linear infinite; }

/* DNA Helix */
.colossus-rapid-thinking .mini-helix {
    position: relative;
    width: 40px;
    height: 100px;
}

.colossus-rapid-thinking .mini-helix-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    left: 50%;
}

.colossus-rapid-thinking .mini-helix .strand-1 .mini-helix-dot {
    background: var(--colossus-purple);
    animation: colossusHelixSpin 2s ease-in-out infinite;
}

.colossus-rapid-thinking .mini-helix .strand-2 .mini-helix-dot {
    background: var(--colossus-cyan);
    animation: colossusHelixSpinReverse 2s ease-in-out infinite;
}

.colossus-rapid-thinking .mini-helix-dot:nth-child(1) { top: 0%; animation-delay: 0s; }
.colossus-rapid-thinking .mini-helix-dot:nth-child(2) { top: 20%; animation-delay: 0.15s; }
.colossus-rapid-thinking .mini-helix-dot:nth-child(3) { top: 40%; animation-delay: 0.3s; }
.colossus-rapid-thinking .mini-helix-dot:nth-child(4) { top: 60%; animation-delay: 0.45s; }
.colossus-rapid-thinking .mini-helix-dot:nth-child(5) { top: 80%; animation-delay: 0.6s; }

/* Wave Processor */
.colossus-rapid-thinking .mini-wave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 60px;
}

.colossus-rapid-thinking .mini-wave-bar {
    width: 6px;
    background: linear-gradient(180deg, var(--colossus-purple), var(--colossus-cyan));
    border-radius: 3px;
    animation: colossusWaveProcess 0.8s ease-in-out infinite;
}

.colossus-rapid-thinking .mini-wave-bar:nth-child(1) { animation-delay: 0s; }
.colossus-rapid-thinking .mini-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.colossus-rapid-thinking .mini-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.colossus-rapid-thinking .mini-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.colossus-rapid-thinking .mini-wave-bar:nth-child(5) { animation-delay: 0.4s; }

/* Typing Indicator */
.colossus-rapid-thinking .mini-typing {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--colossus-purple), var(--colossus-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.colossus-rapid-thinking .mini-typing::after {
    content: '|';
    -webkit-text-fill-color: var(--colossus-cyan);
    animation: colossusCursorBlink 0.5s step-end infinite;
}

/* Infinity Loop */
.colossus-rapid-thinking .mini-infinity {
    position: relative;
    width: 100px;
    height: 50px;
}

.colossus-rapid-thinking .mini-infinity-path {
    position: absolute;
    width: 35px;
    height: 35px;
    border: 3px solid transparent;
    border-top-color: var(--colossus-purple);
    border-radius: 50%;
    top: 8px;
}

.colossus-rapid-thinking .mini-infinity-left {
    left: 5px;
    animation: colossusInfinityLeft 1.5s linear infinite;
}

.colossus-rapid-thinking .mini-infinity-right {
    right: 5px;
    animation: colossusInfinityRight 1.5s linear infinite;
}

.colossus-rapid-thinking .mini-infinity-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--colossus-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--colossus-gold);
    animation: colossusMiniInfinityMove 3s ease-in-out infinite;
}

/* Proteus Core */
.colossus-rapid-thinking .mini-proteus {
    position: relative;
    width: 80px;
    height: 80px;
}

.colossus-rapid-thinking .mini-proteus-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--colossus-cyan);
    transform: rotate(45deg);
    animation: colossusProteusRotate 6s linear infinite;
}

.colossus-rapid-thinking .mini-proteus-inner {
    position: absolute;
    top: 15px;
    left: 15px;
    width: calc(100% - 30px);
    height: calc(100% - 30px);
    background: linear-gradient(135deg, var(--colossus-purple), var(--colossus-cyan));
    transform: rotate(45deg);
    animation: colossusPoteusPulse 1.5s ease-in-out infinite;
}

.colossus-rapid-thinking .mini-proteus-eye {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px #fff;
}

/* ==================== COLOSSUS MODAL ==================== */
/*
 * Colossus Modal - Premium modal style with zoom-in and blur effects
 *
 * USAGE:
 *   <div class="modal colossus-backdrop">
 *       <div class="modal-content colossus-modal colossus-zoom-in">
 *           <div class="colossus-modal-header"><h3>Title</h3></div>
 *           <div class="colossus-modal-body">Content</div>
 *           <div class="colossus-modal-footer">Buttons</div>
 *       </div>
 *   </div>
 *
 * CLASSES:
 *   .colossus-backdrop  - Blur background + fade-in animation
 *   .colossus-zoom-in   - Zoom from 70% to 100% + fade-in
 *   .colossus-modal     - Dark theme styling (purple/cyan)
 *   .colossus-modal-header/body/footer - Section styling
 *   .colossus-btn       - Gradient button styling
 */

/* Base modal styles (for pages without their own modal CSS) */
.modal {
    display: none; /* Hidden by default, shown via JavaScript */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #1e1e2e;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow: auto;
}

/* Reusable modal backdrop with blur effect */
.colossus-backdrop {
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: colossusModalBackdropIn 0.3s ease-out;
}

/* Reusable zoom-in animation for modal content */
.colossus-zoom-in {
    animation: colossusModalZoomIn 0.3s ease-out;
    transform-origin: center center;
}

.colossus-modal {
    background: var(--colossus-bg) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(168, 85, 247, 0.1) !important;
}

.colossus-modal-header {
    background: var(--colossus-bg-light);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
}

.colossus-modal-header h2,
.colossus-modal-header h3 {
    color: #fff;
    margin: 0;
    font-weight: 600;
    background: linear-gradient(135deg, var(--colossus-purple), var(--colossus-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.colossus-modal-body {
    padding: 24px;
    color: #e2e8f0;
}

.colossus-modal-footer {
    background: var(--colossus-bg-light);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    padding: 16px 24px;
    border-radius: 0 0 16px 16px;
}

.colossus-status-text {
    color: var(--colossus-cyan);
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

/* Colossus-styled buttons */
.colossus-btn {
    background: linear-gradient(135deg, var(--colossus-purple), var(--colossus-cyan));
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.colossus-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.colossus-btn-secondary {
    background: transparent;
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: var(--colossus-purple);
}

.colossus-btn-secondary:hover {
    background: rgba(168, 85, 247, 0.1);
    box-shadow: none;
    transform: none;
}
