/**
 * JUPITER AI INTEGRATION STYLES
 * ==============================
 * Styling for revolutionary AI control features
 */

/* ========================================
   LAYER TRANSITION OVERLAY
   ======================================== */

.layer-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.layer-transition-overlay.fade-out {
    animation: fadeOut 0.5s ease;
}

.layer-transition-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 40px;
}

.layer-icon {
    font-size: 80px;
    margin-bottom: 20px;
    color: #00ff88;
    animation: pulse 2s infinite;
}

.layer-icon i {
    filter: drop-shadow(0 0 20px #00ff88);
}

.layer-name {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #00ff88, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.layer-description {
    font-size: 20px;
    color: #94a3b8;
    margin-bottom: 30px;
    line-height: 1.6;
}

.layer-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.layer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #0088ff, #ff00ff);
    background-size: 200% 100%;
    animation: progressGlow 2s linear;
    transition: width 2s ease-in-out;
}

/* ========================================
   JUPITER CONTROL PANEL
   ======================================== */

.jupiter-control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 16px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.2);
}

.jupiter-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.jupiter-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ff88, #0088ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
    animation: avatarPulse 3s infinite;
}

.jupiter-avatar i {
    font-size: 30px;
    color: white;
}

.jupiter-avatar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #00ff88, #0088ff);
    border-radius: 50%;
    opacity: 0.3;
    animation: ringPulse 3s infinite;
}

.jupiter-status {
    flex: 1;
}

.jupiter-name {
    font-size: 18px;
    font-weight: bold;
    color: white;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.jupiter-state {
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

.jupiter-state.active {
    color: #00ff88;
    animation: textGlow 2s infinite;
}

.jupiter-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.jupiter-btn {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.jupiter-btn:hover:not(:disabled) {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

.jupiter-btn:active:not(:disabled) {
    transform: translateY(0);
}

.jupiter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.jupiter-btn.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.jupiter-btn i {
    font-size: 16px;
}

.jupiter-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.jupiter-layer,
.jupiter-mode {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

.jupiter-layer span,
.jupiter-mode span {
    color: #00ff88;
    font-weight: 600;
}

/* ========================================
   JUPITER SUBTITLE (Speech Display)
   ======================================== */

.jupiter-subtitle {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    max-width: 80%;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 136, 0.5);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
}

.jupiter-subtitle.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.jupiter-subtitle::before {
    content: '🎤';
    margin-right: 10px;
}

/* ========================================
   DARK WEB MODE EFFECTS
   ======================================== */

.threat-map-wrapper.dark-web-mode {
    filter: hue-rotate(280deg) contrast(1.2);
}

.threat-map-wrapper.dark-web-mode #threat-map-3d {
    border-color: #ff0000;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.5);
}

/* Matrix effect styling (handled by Three.js) */

/* ========================================
   FACE MORPH MODE INDICATORS
   ======================================== */

.jupiter-face-mode-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 136, 255, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100;
    animation: slideDown 0.3s ease;
}

.jupiter-face-mode-indicator i {
    margin-right: 8px;
}

/* ========================================
   LAYER DEPTH INDICATORS
   ======================================== */

.layer-depth-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.layer-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.layer-dot.active {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    transform: scale(1.5);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

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

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

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px #00ff88;
    }
    50% {
        text-shadow: 0 0 20px #00ff88, 0 0 30px #00ff88;
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ========================================
   ADMIN CONSOLE CONNECTION INDICATOR
   ======================================== */

.admin-console-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-console-status.connected {
    border-color: #00ff88;
}

.admin-console-status.disconnected {
    border-color: #ff4444;
}

.admin-console-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
}

.admin-console-status.connected .status-dot {
    background: #00ff88;
    animation: pulse 2s infinite;
}

/* ========================================
   ZOOM LAYER VISUALIZATION
   ======================================== */

.zoom-layer-visualization {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.zoom-layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-layer-item:hover {
    transform: translateX(-5px);
}

.zoom-layer-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.zoom-layer-item.active .zoom-layer-dot {
    width: 16px;
    height: 16px;
    background: #00ff88;
    box-shadow: 0 0 15px #00ff88;
}

.zoom-layer-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    min-width: 100px;
}

.zoom-layer-item:hover .zoom-layer-label,
.zoom-layer-item.active .zoom-layer-label {
    opacity: 1;
    color: white;
}

/* ========================================
   THREAT HIGHLIGHT EFFECTS (Jupiter AI)
   ======================================== */

.threat-highlighted {
    animation: threatHighlight 2s infinite;
}

@keyframes threatHighlight {
    0%, 100% {
        filter: drop-shadow(0 0 10px #ffff00);
    }
    50% {
        filter: drop-shadow(0 0 30px #ffff00);
    }
}

/* ========================================
   VOICE CONTROL INDICATOR
   ======================================== */

.voice-control-active {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.3), transparent);
    border-radius: 50%;
    z-index: 9998;
    pointer-events: none;
    animation: voicePulse 1.5s infinite;
}

@keyframes voicePulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .jupiter-control-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        top: auto;
        bottom: 20px;
    }

    .jupiter-subtitle {
        font-size: 14px;
        padding: 12px 20px;
        bottom: 200px;
    }

    .layer-transition-content {
        padding: 20px;
    }

    .layer-name {
        font-size: 32px;
    }

    .layer-description {
        font-size: 16px;
    }

    .layer-icon {
        font-size: 60px;
    }

    .zoom-layer-visualization {
        display: none; /* Hide on mobile */
    }
}

@media (max-width: 480px) {
    .jupiter-control-panel {
        padding: 15px;
    }

    .jupiter-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .jupiter-avatar {
        width: 50px;
        height: 50px;
    }

    .jupiter-avatar i {
        font-size: 24px;
    }

    .jupiter-name {
        font-size: 16px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .layer-transition-overlay,
    .jupiter-subtitle,
    .jupiter-btn,
    .layer-dot,
    .zoom-layer-item {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .jupiter-control-panel {
        border-width: 2px;
    }

    .jupiter-btn {
        border-width: 2px;
    }

    .jupiter-subtitle {
        border-width: 2px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .jupiter-control-panel,
    .jupiter-subtitle,
    .layer-transition-overlay,
    .admin-console-status {
        display: none !important;
    }
}
