/* AI Page Enhancements */
#page-ai {
    height: 100%;
    padding: 0; /* Override default padding */
    position: relative;
    overflow: hidden;
}

#ai-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.ai-content-scrollable {
    position: relative;
    z-index: 1;
}

.ai-input-fixed {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    z-index: 10;
}

.ai-mode-switch {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.mode-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding-bottom: 4px;
    position: relative;
    transition: all 0.3s;
}

.mode-btn.active {
    color: var(--accent-primary);
}

.mode-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: var(--neon-glow);
    border-radius: 2px;
}

.ai-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 8px 8px 8px 16px;
}

.ai-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    cursor: pointer;
    transition: transform 0.2s;
}

.send-btn:active {
    transform: scale(0.9);
}

.send-btn .icon {
    width: 16px;
    height: 16px;
}

/* Adjust recommended tags for dark background */
.recommend-tag {
    background: rgba(30, 34, 45, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(76, 217, 192, 0.2);
    box-shadow: 0 0 10px rgba(76, 217, 192, 0.05);
}

/* HUD Animation */
.ai-hud-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
}

.hud-ring.outer {
    width: 100%;
    height: 100%;
    border-top-color: rgba(76, 217, 192, 0.3);
    border-bottom-color: rgba(76, 217, 192, 0.1);
    animation: spin 10s linear infinite;
}

.hud-ring.outer::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
}

.hud-ring.middle {
    width: 70%;
    height: 70%;
    border: 2px dashed rgba(76, 157, 217, 0.3);
    animation: spin 5s linear infinite reverse;
}

.hud-ring.inner {
    width: 40%;
    height: 40%;
    border: 2px solid rgba(76, 217, 192, 0.5);
    border-left-color: transparent;
    border-right-color: transparent;
    animation: spin 3s linear infinite;
}

.hud-core {
    width: 20%;
    height: 20%;
    background: radial-gradient(circle, var(--accent-primary), transparent);
    border-radius: 50%;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px var(--accent-primary);
}

.hud-scanner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, transparent 0%, rgba(76, 217, 192, 0.1) 50%, transparent 100%);
    border-top: 1px solid rgba(76, 217, 192, 0.5);
    animation: scan 3s linear infinite;
    clip-path: circle(50%);
}

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

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

@keyframes scan {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
