/**
 * Homepage Infinity Loop Styles - FEATURE-026
 */

/* Container - transparent background to match mockup */
.homepage-infinity-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2rem;
    background: transparent;
    color: var(--bs-body-color, #212529);
}

/* Header */
.homepage-header {
    text-align: center;
    margin-bottom: 2rem;
}

.homepage-header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4facfe, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
}

.homepage-header p {
    font-size: 1.25rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
}

/* Infinity Loop Container */
.infinity-loop-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
}

.infinity-loop {
    position: relative;
    width: 100%;
    height: 100%;
}

.infinity-bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.9;
}

/* Loop Labels */
.loop-label {
    position: absolute;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.loop-label.control {
    left: 19%;
    top: 49%;
    color: #00c6fb;
}

.loop-label.transparency {
    left: 64%;
    top: 49%;
    color: #a855f7;
}

/* Stage Buttons - Circular like mockup */
.stage-btn {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Individual button colors - customized */
.stage-btn[data-stage="ideation"] {
    background: rgb(123, 68, 174);
    color: #fff;
}

.stage-btn[data-stage="requirement"] {
    background: rgb(165, 87, 194);
    color: #fff;
}

.stage-btn[data-stage="implementation"] {
    background: rgb(110, 99, 206);
    color: #fff;
}

.stage-btn[data-stage="deployment"] {
    background: rgb(67, 161, 231);
    color: #fff;
}

.stage-btn[data-stage="validation"] {
    background: rgb(66, 112, 203);
    color: #fff;
}

.stage-btn[data-stage="monitoring"] {
    background: rgb(62, 157, 226);
    color: #fff;
}

.stage-btn[data-stage="feedback"] {
    background: rgb(69, 124, 213);
    color: #fff;
}

.stage-btn[data-stage="planning"] {
    background: rgb(125, 72, 184);
    color: #fff;
}

.stage-btn:hover {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.stage-btn.tbd {
    background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%) !important;
    opacity: 0.8;
    cursor: not-allowed;
}

.stage-btn.tbd:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Stage Icon & Label */
.stage-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.stage-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
}

/* TBD Badge */
.tbd-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Legend */
.homepage-legend {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--bs-secondary-color, #6c757d);
}

.legend-control::before {
    color: #4facfe;
}

.legend-transparency::before {
    color: #a855f7;
}

/* Tooltip */
.homepage-tooltip {
    position: fixed;
    background: #1f2937;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.homepage-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1f2937;
}

/* Sidebar Highlight - Epic neon glow effect */
.homepage-highlight {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, 
        rgba(139, 92, 246, 0.25) 0%, 
        rgba(59, 130, 246, 0.15) 50%,
        rgba(236, 72, 153, 0.2) 100%) !important;
    border-left: 3px solid transparent !important;
    border-image: linear-gradient(180deg, #8b5cf6, #3b82f6, #ec4899) 1 !important;
    box-shadow: 
        0 0 15px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(59, 130, 246, 0.3),
        0 0 60px rgba(139, 92, 246, 0.15),
        inset 0 0 15px rgba(139, 92, 246, 0.1);
    animation: homepage-highlight-neon 2s ease-in-out infinite;
    border-radius: 6px;
    margin: 2px 4px;
    padding-left: 8px !important;
    z-index: 1;
}

/* Animated border gradient */
.homepage-highlight::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #8b5cf6, #3b82f6, #06b6d4, #ec4899, 
        #8b5cf6, #3b82f6, #06b6d4, #ec4899);
    background-size: 400% 400%;
    border-radius: 8px;
    z-index: -2;
    animation: homepage-border-rotate 3s linear infinite;
    opacity: 0.7;
}

/* Inner fill to create border effect */
.homepage-highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(15, 23, 42, 0.7) 50%,
        rgba(15, 23, 42, 0.85) 100%);
    border-radius: 6px;
    z-index: -1;
    animation: homepage-highlight-shimmer 2s ease-in-out infinite;
}

/* Neon pulse */
@keyframes homepage-highlight-neon {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(139, 92, 246, 0.5),
            0 0 30px rgba(59, 130, 246, 0.3),
            0 0 60px rgba(139, 92, 246, 0.15),
            inset 0 0 15px rgba(139, 92, 246, 0.1);
    }
    33% {
        box-shadow: 
            0 0 20px rgba(59, 130, 246, 0.6),
            0 0 40px rgba(6, 182, 212, 0.4),
            0 0 80px rgba(59, 130, 246, 0.2),
            inset 0 0 20px rgba(59, 130, 246, 0.15);
    }
    66% {
        box-shadow: 
            0 0 20px rgba(236, 72, 153, 0.5),
            0 0 40px rgba(139, 92, 246, 0.35),
            0 0 80px rgba(236, 72, 153, 0.2),
            inset 0 0 20px rgba(236, 72, 153, 0.1);
    }
}

/* Rotating gradient border */
@keyframes homepage-border-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Inner shimmer */
@keyframes homepage-highlight-shimmer {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.7; }
}

/* Responsive - Hide on mobile */
@media (max-width: 768px) {
    .homepage-infinity-container {
        display: none;
    }
}
