/* ============================================
   Line Following Page - Specific Styles
   Cyan/Teal precision tracking theme
   ============================================ */

/* ============ Theme Override Variables ============ */
.line-following-page {
    --comp-primary: #00e5ff;
    --comp-secondary: #00bfa5;
    --comp-accent: #64ffda;
    --comp-danger: #ff1744;
    --comp-purple: #aa66ff;
    --comp-gradient: linear-gradient(135deg, #00e5ff, #00bfa5);
    --comp-gradient-gold: linear-gradient(135deg, #ffd700, #ffb547);
}

/* ============ Loading Screen - Line Follow Animation ============ */
.lf-loader {
    animation: lfTrackPulse 2s ease-in-out infinite;
}

@keyframes lfTrackPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.lf-loader-svg {
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.4));
}

/* ============ Hero - Track Background ============ */
.lf-track-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(0, 191, 165, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(100, 255, 218, 0.04) 0%, transparent 50%);
    animation: lfTrackGlow 4s ease-in-out infinite;
}

@keyframes lfTrackGlow {
    0%, 100% { opacity: 1; }
    25% { opacity: 0.7; }
    50% { opacity: 1; }
    75% { opacity: 0.8; }
}

/* Hero Orbs - Cyan Theme */
.line-following-page .orb-1 {
    background: rgba(0, 229, 255, 0.25);
}

.line-following-page .orb-2 {
    background: rgba(0, 191, 165, 0.2);
}

.line-following-page .orb-3 {
    background: rgba(100, 255, 218, 0.15);
}

/* Hero Image Frame - Cyan accents */
.line-following-page .corner {
    border-color: var(--comp-primary);
}

.line-following-page .image-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 229, 255, 0.2) 0%,
        transparent 50%,
        rgba(0, 191, 165, 0.2) 100%
    );
}

/* ============ Robot Specs Section ============ */
.lf-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.lf-spec-card {
    text-align: center;
    padding: 30px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.lf-spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--comp-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lf-spec-card:hover {
    transform: translateY(-8px);
    border-color: var(--comp-primary);
    box-shadow: 0 20px 50px rgba(0, 229, 255, 0.15);
}

.lf-spec-card:hover::before {
    opacity: 1;
}

.lf-spec-visual {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lf-spec-svg {
    width: 100%;
    height: 100%;
}

.lf-spec-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.lf-spec-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--comp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.lf-spec-value span {
    font-size: 1rem;
    opacity: 0.7;
}

.lf-spec-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ============ Track SVG ============ */
.lf-track-svg {
    border-radius: 12px;
    overflow: visible;
}

.lf-track-info-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* ============ Warning Icon (5-second rule) ============ */
.lf-icon-warning {
    background: rgba(255, 152, 0, 0.1) !important;
}

.lf-icon-warning svg {
    stroke: #ff9800 !important;
}

/* ============ Gallery Grid - 5 Images Layout ============ */
.lf-gallery-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
}

.lf-gallery-grid .gallery-item-large {
    grid-column: 1;
    grid-row: 1 / 3;
}

.lf-gallery-grid .gallery-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.lf-gallery-grid .gallery-item:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.lf-gallery-grid .gallery-item:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

.lf-gallery-grid .gallery-item:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}

/* ============ Section Tag Override ============ */
.line-following-page .section-tag {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--comp-primary);
}

/* ============ Badge Override ============ */
.line-following-page .badge-category {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.4);
    color: var(--comp-primary);
}

/* ============ Stat Item Hover ============ */
.line-following-page .stat-item:hover {
    border-color: var(--comp-primary);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15);
}

.line-following-page .stat-icon {
    background: rgba(0, 229, 255, 0.1);
}

.line-following-page .stat-icon svg {
    stroke: var(--comp-primary);
}

/* ============ Goal Card Hover ============ */
.line-following-page .goal-card:hover {
    border-color: var(--comp-primary);
}

.line-following-page .goal-number {
    color: rgba(0, 229, 255, 0.15);
}

.line-following-page .goal-icon {
    background: rgba(0, 229, 255, 0.1);
}

.line-following-page .goal-icon svg {
    stroke: var(--comp-primary);
}

/* ============ Info Card Override ============ */
.line-following-page .info-card h4 {
    color: var(--comp-primary);
}

.line-following-page .participant-list li i {
    color: var(--comp-primary);
}

/* ============ Feature Card Override ============ */
.line-following-page .feature-card:hover {
    border-color: var(--comp-primary);
}

/* ============ Stage Colors ============ */
.line-following-page .stage-1 .stage-marker {
    border-color: var(--comp-primary);
}
.line-following-page .stage-1 .stage-number {
    color: var(--comp-primary);
}

.line-following-page .timeline-line {
    background: linear-gradient(180deg, #00e5ff, #00bfa5, #64ffda);
}

/* ============ Tech Card Override ============ */
.line-following-page .tech-icon {
    background: rgba(0, 229, 255, 0.1);
}

.line-following-page .tech-icon svg {
    stroke: var(--comp-primary);
}

.line-following-page .tech-card-highlight {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(0, 191, 165, 0.05));
    border-color: rgba(0, 229, 255, 0.3);
}

.line-following-page .tech-card-highlight .tech-icon {
    background: var(--comp-gradient);
}

.line-following-page .tech-card-highlight .tech-icon svg {
    stroke: white;
}

/* ============ CTA Override ============ */
.line-following-page .cta-glow {
    background: radial-gradient(circle, rgba(0, 229, 255, 0.2), transparent 70%);
}

/* ============ Card Glass Hover ============ */
.line-following-page .card-glass:hover {
    border-color: rgba(0, 229, 255, 0.3);
}

/* ============ Button Glow Override ============ */
.line-following-page .btn-glow::before {
    background: var(--comp-gradient);
}

/* ============ Obstacle Card Override ============ */
.line-following-page .obstacle-card:hover {
    border-color: var(--comp-primary);
}

.line-following-page .obstacle-number {
    background: var(--comp-gradient);
}

.line-following-page .obstacle-icon {
    background: rgba(0, 229, 255, 0.1);
}

.line-following-page .obstacle-icon svg {
    stroke: var(--comp-primary);
}

/* ============ Grid Floor Override ============ */
.line-following-page .grid-floor {
    background:
        linear-gradient(transparent, rgba(0, 229, 255, 0.1)),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(0, 229, 255, 0.1) 49px,
            rgba(0, 229, 255, 0.1) 50px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            rgba(0, 229, 255, 0.1) 49px,
            rgba(0, 229, 255, 0.1) 50px
        );
    transform: perspective(500px) rotateX(60deg);
    transform-origin: bottom;
}

/* ============ Scroll Indicator ============ */
.line-following-page .wheel {
    background: var(--comp-primary);
}

/* ============ Stage Highlight ============ */
.line-following-page .stage-highlight {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--comp-primary);
}

/* ============ Inklyuziv Badge ============ */
.line-following-page .badge-inklyuziv {
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid rgba(0, 229, 255, 0.5);
    color: var(--comp-primary);
}

/* ============ Penalty Section ============ */
.line-following-page .penalty-icon svg {
    stroke: var(--comp-primary);
}

/* ============ Responsive ============ */
@media (max-width: 1200px) {
    .lf-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lf-track-info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .lf-gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 200px 200px;
    }

    .lf-gallery-grid .gallery-item-large {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .lf-gallery-grid .gallery-item:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .lf-gallery-grid .gallery-item:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .lf-gallery-grid .gallery-item:nth-child(4) {
        grid-column: 1;
        grid-row: 3;
    }

    .lf-gallery-grid .gallery-item:nth-child(5) {
        grid-column: 2;
        grid-row: 3;
    }
}

@media (max-width: 992px) {
    .lf-gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .lf-gallery-grid .gallery-item-large {
        grid-column: 1;
        grid-row: 1;
    }

    .lf-gallery-grid .gallery-item:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .lf-gallery-grid .gallery-item:nth-child(3) {
        grid-column: 1;
        grid-row: 3;
    }

    .lf-gallery-grid .gallery-item:nth-child(4) {
        grid-column: 1;
        grid-row: 4;
    }

    .lf-gallery-grid .gallery-item:nth-child(5) {
        grid-column: 1;
        grid-row: 5;
    }
}

@media (max-width: 768px) {
    .lf-specs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .lf-spec-card {
        padding: 24px 16px;
    }

    .lf-spec-visual {
        width: 90px;
        height: 90px;
    }

    .lf-spec-value {
        font-size: 1.4rem;
    }

    .lf-track-info-grid {
        grid-template-columns: 1fr !important;
    }

    .lf-gallery-grid .gallery-item {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .lf-spec-value {
        font-size: 1.2rem;
    }

    .lf-gallery-grid .gallery-item {
        height: 180px;
    }
}
