/*
Theme Name: NileNet OS Pro
Theme URI: https://nilenet.os
Author: Senior WP Developer & UI/UX Designer
Author URI: https://nilenet.os
Description: Futuristic Cyber-Neon WordPress Theme with Dynamic Theme Switching, Glassmorphism, RTL/LTR dynamic layout, Dark Mode, and a full AI Studio Hub interface (sidebar, toolbox, prompt input, live results).
Version: 1.1.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nilenet-os-pro
Tags: dark-mode, rtl-language-support, custom-menu, featured-images, translation-ready, ai, glassmorphism
*/

/* CSS Reset & Variable Defaults */
:root {
    --bg-main: #08080e;
    --neon-color: #a855f7;
    --neon-glow: rgba(168, 85, 247, 0.4);
    --glass-bg: rgba(15, 15, 26, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
}

:root[data-theme="purple"] {
    --neon-color: #a855f7;
    --neon-glow: rgba(168, 85, 247, 0.45);
}
:root[data-theme="crimson"] {
    --neon-color: #f43f5e;
    --neon-glow: rgba(244, 63, 94, 0.45);
}
:root[data-theme="cyber-blue"] {
    --neon-color: #06b6d4;
    --neon-glow: rgba(6, 182, 212, 0.45);
}
:root[data-theme="emerald"] {
    --neon-color: #10b981;
    --neon-glow: rgba(16, 185, 129, 0.45);
}
:root[data-theme="amber"] {
    --neon-color: #f59e0b;
    --neon-glow: rgba(245, 158, 11, 0.45);
}
:root[data-theme="indigo"] {
    --neon-color: #6366f1;
    --neon-glow: rgba(99, 102, 241, 0.45);
}
:root[data-theme="pink"] {
    --neon-color: #ec4899;
    --neon-glow: rgba(236, 72, 153, 0.45);
}
:root[data-theme="acid"] {
    --neon-color: #84cc16;
    --neon-glow: rgba(132, 204, 22, 0.45);
}

html[data-mode="light"] {
    --bg-main: #f3f4f8;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(15, 15, 26, 0.08);
}

html[data-mode="light"] body {
    color: #14141c;
}

html[data-mode="light"] .text-slate-400 {
    color: #52525b !important;
}

body {
    background-color: var(--bg-main);
    color: #e2e8f0;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

body[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

body[dir="ltr"] {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.neon-border {
    border-color: var(--neon-color) !important;
}

.neon-text {
    color: var(--neon-color) !important;
}

.neon-bg {
    background-color: var(--neon-color) !important;
}

.neon-shadow {
    box-shadow: 0 0 25px var(--neon-glow);
}

.neon-shadow-sm {
    box-shadow: 0 0 10px var(--neon-glow);
}

/* Dynamic Glowing Pulse Animation */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--neon-color);
    animation: neonPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes neonPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.25;
        transform: scale(1.18);
    }
}

/* ---------------------------------------------------- */
/* AI Studio Hub — Sidebar, Toolbox, Prompt & Results    */
/* ---------------------------------------------------- */

.studio-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border-radius: 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.studio-sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.studio-sidebar-link.active {
    color: var(--neon-color);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border);
    box-shadow: 0 0 15px var(--neon-glow);
}

.studio-select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    color: #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.studio-select:focus {
    border-color: var(--neon-color);
    box-shadow: 0 0 10px var(--neon-glow);
}

.studio-mic-btn.is-recording {
    background-color: #ef4444 !important;
    color: #fff !important;
    animation: neonPulse 1.4s ease-in-out infinite;
}

.studio-result-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    gap: 0.75rem;
    min-height: 240px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--neon-color);
    display: inline-block;
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-6px); opacity: 1; }
}

/* ==================================================== */
/* Language Switching & Direction Support (RTL/LTR)     */
/* ==================================================== */

[dir="ltr"] .rtl\:space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 0;
}

[dir="rtl"] .rtl\:space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="ltr"] input, [dir="ltr"] textarea, [dir="ltr"] select {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select {
    direction: rtl;
    text-align: right;
}
/* ============================================================ */
/* Real login widget styling ([nilnet_login] from Nilnet User    */
/* Manager) — matches the glass/neon look of the rest of the UI  */
/* ============================================================ */
.nilnet-login-widget { display: flex; flex-direction: column; gap: 14px; }
.nilnet-oauth-buttons { display: flex; flex-direction: column; gap: 10px; }
.nilnet-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.nilnet-btn:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.06); }
.nilnet-btn:disabled { opacity: .5; cursor: not-allowed; }
.nilnet-otp-form { display: flex; gap: 8px; }
.nilnet-otp-form input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: inherit;
}
.nilnet-otp-form button {
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}
.nilnet-login-message { min-height: 18px; font-size: 13px; text-align: center; }
