:root {
    /* Ozon Health Theme: Light, Clean, Medical/Scientific */
    --primary: #0077be;
    /* Ocean Blue */
    --primary-dark: #005c99;
    --secondary: #e0f7fa;
    /* Very Light Blue */
    --accent: #faf0e6;
    /* Linen/Cream (Health warmth) */

    --bg-dark: #f5f5f7;
    /* Off-white/Light Gray background */
    --glass-bg: rgba(255, 255, 255, 0.95);
    /* White Glass */
    --glass-border: rgba(0, 119, 190, 0.1);

    --text-main: #333333;
    /* Dark Gray for readability */
    --text-muted: #666666;

    --success: #28a745;
    --border-color: rgba(0, 0, 0, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #4fc3f7;
    /* Lighter Blue for Dark Mode */
    --primary-dark: #0288d1;
    --secondary: #263238;
    /* Dark Blue-Grey */
    --accent: #37474f;

    --bg-dark: #121212;
    /* True Dark Background */
    --glass-bg: rgba(30, 30, 40, 0.85);
    /* Dark Glass */
    --glass-border: rgba(255, 255, 255, 0.1);

    --text-main: #e0e0e0;
    /* Light Grey Text */
    --text-muted: #b0bec5;

    --border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] body {
    background-image: radial-gradient(circle at 10% 20%, #1a237e 0%, var(--bg-dark) 90%);
}

[data-theme="dark"] .glass-panel {
    background: var(--glass-bg);
}

[data-theme="dark"] .tree-node,
[data-theme="dark"] .hero-card,
[data-theme="dark"] input {
    background: var(--secondary) !important;
    border-color: var(--border-color);
    color: var(--text-main);
}

[data-theme="dark"] .tree-node .node-name {
    color: var(--text-main);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* TABS SYSTEM */
.tabs-header {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background: var(--bg-dark);
    background-image: radial-gradient(circle at 10% 20%, var(--secondary) 0%, var(--bg-dark) 90%);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Glass Buttons */
.glass-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 119, 190, 0.2);
}

.glass-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 190, 0.3);
}

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Forms */
input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
}

/* Stats Cards */
.stat-card {
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Card - Professional */
.hero-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 119, 190, 0.3);
}

/* Badges & Levels */
.level-badge-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

.level-circle {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.xp-container {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: white;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.xp-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Shield */
.shield-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    border-left: 4px solid white;
}

.shield-container.critical {
    border-left-color: #ffcccc;
    /* Soft red */
    background: rgba(255, 0, 0, 0.1);
}

.shield-icon {
    font-size: 2rem;
}

/* Network Tree */
.network-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.tree-level {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.tree-node {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    width: 180px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tree-node:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(0, 119, 190, 0.15);
}

.node-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.node-name {
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 5px;
}

.node-badge {
    font-size: 0.8rem;
    color: var(--primary);
    background: var(--secondary);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.connector-vertical {
    width: 2px;
    height: 20px;
    background: #ccc;
    margin: 0 auto;
}

/* Rank Glows - Subtle for Pro Theme */
.rank-bronze {
    box-shadow: 0 0 0 2px #cd7f32;
}

.rank-silver {
    box-shadow: 0 0 0 2px #c0c0c0;
}

.rank-gold {
    box-shadow: 0 0 0 2px #ffd700;
}

.rank-platinum {
    box-shadow: 0 0 0 2px #e5e4e2;
}

.rank-diamond {
    box-shadow: 0 0 0 2px #b9f2ff;
}

/* Responsive */
@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero-card {
        margin-bottom: 20px;
    }
}