/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700&display=swap');

:root {
    /* Dark Mode AURA Palette */
    --bg-deep: #050505;
    --bg-surface: rgba(20, 25, 40, 0.75);
    --bg-card: rgba(30, 35, 50, 0.6);
    --primary: #00f2ff;
    /* Cyan AURA */
    --primary-glow: rgba(0, 242, 255, 0.2);
    --secondary: #bd00ff;
    /* Purple AURA */
    --accent: #00ff9d;
    /* Green DNA */
    --text-main: #f0fdfa;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;

    /* Earth Background */
    background: url('/earth_spinning.gif') no-repeat center center fixed;
    background-size: cover;
    /* Cover or Contain depending on resolution preference */
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    /* Overall dimming overlay for readability */
    backdrop-filter: blur(3px);
    /* Slight blur to make text pop against earth */
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(10, 10, 15, 0.85);
    /* Semi-transparent dark */
    backdrop-filter: blur(15px);
    border-right: 1px solid var(--border);
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    height: 100vh;
    position: sticky;
    top: 0;
    justify-content: space-between;
    z-index: 9999;
}

.sidebar-header {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--primary);
    text-align: center;
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: var(--glass-border);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.1) 0%, transparent 100%);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.user-panel {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Main Workspace */
.main-workspace {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

h1,
h2,
h3 {
    margin-bottom: 1.5rem;
    font-weight: 300;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards / Glass Panels */
.card,
.login-box,
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

/* Forms */
input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    font-family: inherit;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 20px var(--primary);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.text-danger {
    color: #ef4444;
}

.text-success {
    color: #10b981;
}

.text-warning {
    color: #f59e0b;
}

/* Genetic / AI Chat Specifics */
.chat-container {
    height: 70vh;
    display: flex;
    flex-direction: column;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.message-bubble {
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    max-width: 80%;
}

.message-user {
    background: rgba(79, 70, 229, 0.3);
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.message-ai {
    background: rgba(255, 255, 255, 0.05);
    margin-right: auto;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border);
}