/* 
   ID: #010
   Bird: Joyful Budgerigars
   Path: /v2-php/public/assets/css/theme.css
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Nunito:wght@200;300;400;500;600;700;800;900;1000&family=Work+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    /* Deep Sea Theme Palette */
    --bg-main: #0d1117;
    --bg-card: #161b22;
    --border: #30363d;
    --accent: #58a6ff;
    /* Electric Blue */
    --success: #238636;
    /* Green */
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --danger: #d73a49;

    /* Spacing & Layout */
    --sidebar-width: 250px;
    --header-height: 60px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Work Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
}

code,
pre,
.terminal-font {
    font-family: 'Fira Code', monospace;
}

/* Utility Classes */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.p-4 {
    padding: 1rem;
}

.m-4 {
    margin: 1rem;
}

.w-full {
    width: 100%;
}

/* Glassmorphism Header */
.app-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: rgba(22, 27, 34, 0.6);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    transition: left 0.3s ease;
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-main);
    border-right: 1px solid var(--border);
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    font-size: 1.25rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(88, 166, 255, 0.1);
    border-left-color: var(--accent);
}

/* Main Content Area */
.app-content {
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-family: 'Work Sans', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--success);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

/* Charging Effect */
.btn-charging::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.7);
    width: 0%;
    transition: width 5s linear;
}

.btn-charging.charging::after {
    width: 100%;
}

/* Terminal */
.terminal-window {
    background-color: #000;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Fira Code', monospace;
    color: #0f0;
    height: 300px;
    overflow-y: auto;
}

/* Battery Quota */
.battery-quota {
    display: flex;
    gap: 2px;
    align-items: center;
}

.battery-segment {
    width: 8px;
    height: 12px;
    background-color: var(--border);
    border-radius: 1px;
}

.battery-segment.active {
    background-color: var(--success);
}

.battery-segment.warn {
    background-color: #d29922;
}

.battery-segment.crit {
    background-color: #db2d2d;
}

/* Context Menu */
#custom-context-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    width: 200px;
    background-color: #1c2128;
    border: 1px solid var(--accent);
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    padding: 5px 0;
}

.context-item {
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.context-item:hover {
    background-color: var(--accent);
    color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .app-sidebar {
        transform: translateX(-100%);
        width: 250px;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-header {
        left: 0;
    }

    .app-content {
        margin-left: 0;
        padding: 1rem;
    }

    /* Bottom Nav for Mobile Logic (if implemented) could go here */
}