/* AI Hub Overlay Overhaul */
.ai-hub-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ai-hub-container {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    border-radius: 30px;
    display: flex;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.8);
}

/* Sidebar */
.ai-hub-sidebar {
    width: 350px;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.ai-hub-header h2 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.ai-hub-header p {
    font-size: 0.7rem;
    opacity: 0.5;
    letter-spacing: 2px;
}

.ai-hub-nav {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.hub-nav-btn {
    background: none;
    border: none;
    color: #fff;
    padding: 15px;
    text-align: left;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hub-nav-btn i {
    width: 20px;
    opacity: 0.7;
}

.hub-nav-btn.active {
    background: var(--accent-color);
    color: #000;
}

.hub-nav-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

/* Prompt Oracle */
.prompt-maker-panel {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--accent-secondary);
    margin-top: 20px;
}

.prompt-maker-panel h3 {
    font-size: 0.8rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hot-badge {
    background: #ff4757;
    font-size: 0.5rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.prompt-maker-panel p {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-bottom: 15px;
}

.prompt-input-wrapper {
    display: flex;
    gap: 8px;
}

.prompt-input-wrapper input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.prompt-input-wrapper button {
    background: var(--accent-secondary);
    border: none;
    color: #fff;
    width: 40px;
    border-radius: 8px;
    cursor: pointer;
}

.oracle-result {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.oracle-card h4 {
    font-size: 0.7rem;
    color: var(--accent-tertiary);
    margin-bottom: 10px;
}

.prompt-text {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-left: 2px solid var(--accent-tertiary);
    margin-bottom: 15px;
    font-style: italic;
    color: #ccc;
}

.oracle-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.meta-item small {
    display: block;
    font-size: 0.5rem;
    opacity: 0.5;
}

.meta-item strong {
    font-size: 0.8rem;
}

.oracle-launch-btn {
    display: block;
    background: #fff;
    color: #000;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.7rem;
    transition: 0.3s;
}

.oracle-launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Main Grid Area */
.ai-hub-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.hub-search {
    position: relative;
    margin-bottom: 30px;
}

.hub-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.hub-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 20px 20px 20px 50px;
    border-radius: 20px;
    font-size: 1.1rem;
    outline: none;
    transition: 0.3s;
}

.hub-search input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.ai-hub-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar */
.ai-hub-grid::-webkit-scrollbar {
    width: 5px;
}

.ai-hub-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* App Card */
.ai-app-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.ai-app-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.ai-app-img {
    width: 50px;
    height: 50px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 15px;
}

.ai-app-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.ai-app-content p {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 20px;
}

.ai-app-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-visit-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-fav-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
}

.ai-fav-btn.active {
    color: gold;
}

/* Close Button */
.ai-hub-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

/* Oracle Loading Animation */
.oracle-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.loader-circle {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.oracle-loading span {
    font-size: 0.5rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 900px) {
    .ai-hub-container {
        flex-direction: column;
    }

    .ai-hub-sidebar {
        width: 100%;
        height: auto;
        padding: 20px;
    }

    .ai-hub-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
        margin-top: 20px;
    }

    .hub-nav-btn span {
        display: none;
    }

    .hub-nav-btn {
        padding: 10px;
    }
}

/* AI Top Nexus UI */
.ai-top-nexus {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    display: flex;
    justify-content: center;
}

.neon-bar-nexus {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 8px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(191, 0, 255, 0.1);
    animation: neonBorderPulse 5s infinite;
}

@keyframes neonBorderPulse {

    0%,
    100% {
        border-color: rgba(191, 0, 255, 0.2);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(191, 0, 255, 0.1);
    }

    50% {
        border-color: var(--accent-color);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.2);
    }
}

.nexus-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 10px 15px;
    border-radius: 20px;
}

.nexus-btn i {
    font-size: 1rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
}

.nexus-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.nexus-btn:hover i {
    transform: scale(1.2);
}

.nexus-divider {
    width: 1px;
    height: 25px;
    background: rgba(255, 255, 255, 0.1);
}

.prompt-nexus i {
    color: var(--accent-secondary);
    text-shadow: 0 0 10px var(--accent-secondary);
}

/* Bars inside */
.btn-bars {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 15px;
}

.btn-bars span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
    opacity: 0.5;
    transition: 0.3s;
}

.prompt-nexus .btn-bars span {
    background: var(--accent-secondary);
}

.nexus-btn:hover .btn-bars span {
    width: 120%;
    opacity: 1;
}

.nexus-btn:hover .btn-bars span:nth-child(2) {
    transform: translateX(3px);
}

/* Pulse Focus */
.pulse-focus {
    animation: oraclePulse 1s ease infinite alternate;
}

@keyframes oraclePulse {
    from {
        border-color: rgba(255, 255, 255, 0.1);
    }

    to {
        border-color: var(--accent-secondary);
        box-shadow: 0 0 15px var(--accent-secondary);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .ai-top-nexus {
        top: 10px;
        width: 100%;
    }

    .neon-bar-nexus {
        padding: 5px 15px;
        gap: 10px;
    }

    .nexus-btn span {
        display: none;
    }

    .nexus-btn {
        padding: 8px;
    }
}