:root {
    --bg-color: #0d0d0d;
    --panel-bg: #151515;
    --border-color: #333;
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --accent-color: #00ff41;
    /* Default Matrix Green */
    --accent-glow: rgba(0, 255, 65, 0.2);
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --header-height: 60px;
    --sidebar-width: 240px;
}

body.light-mode {
    --bg-color: #f5f5f5;
    --panel-bg: #ffffff;
    --border-color: #ddd;
    --text-primary: #222222;
    --text-secondary: #666666;
    --accent-glow: rgba(0, 255, 65, 0.1);
}

body.light-mode .content-area {
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f5f5f5 100%);
}

body.light-mode .main-content,
body.light-mode .sidebar,
body.light-mode .header,
body.light-mode .card,
body.light-mode .login-box,
body.light-mode footer {
    background-color: var(--panel-bg);
}

body.light-mode .form-input {
    background: #fff;
    color: #222;
    border-color: #ccc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-shadow: 0 0 8px var(--accent-color);
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    height: var(--header-height);
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px;
}

.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #0d0d0d 100%);
}

/* Technical Aesthetic Elements */
.logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    position: relative;
    padding: 15px;
}

.card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--accent-color);
    border-left: 2px solid var(--accent-color);
}

.card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--accent-color);
    border-right: 2px solid var(--accent-color);
}

/* Grid/List View for Files */
.file-list-container.view-grid .list-header {
    display: none;
}

.file-list-container.view-grid .file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.file-list-container.view-grid .file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.file-list-container.view-grid .file-item>div {
    display: block;
    width: 100%;
    margin-bottom: 5px;
}

.file-list-container.view-grid .file-item .file-meta {
    display: none;
}

.file-list-container.view-grid .file-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.file-item {
    transition: background 0.2s;
}

.file-item:hover {
    background: var(--accent-glow);
}

/* Checkbox Styling */
.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid var(--accent-color);
    background: transparent;
    cursor: pointer;
    appearance: none;
    position: relative;
}

.custom-checkbox:checked {
    background: var(--accent-color);
}

.custom-checkbox:checked::after {
    content: '✓';
    color: var(--bg-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* Bulk Toolbar */
.bulk-toolbar {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    border: 1px solid var(--accent-color);
    padding: 10px 20px;
    display: none;
    /* Shown via JS */
    gap: 15px;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 100;
}

.toolbar-info {
    font-size: 0.8rem;
    color: var(--accent-color);
    border-right: 1px solid var(--border-color);
    padding-right: 15px;
}

/* Login Page Only Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
}

.login-box {
    width: 350px;
    background: rgba(21, 21, 21, 0.9);
    border: 1px solid var(--accent-color);
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.form-input {
    width: 100%;
    background: #000;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-glow);
}

/* Animations */
@keyframes flicker {
    0% {
        opacity: 0.95;
    }

    5% {
        opacity: 0.85;
    }

    10% {
        opacity: 0.95;
    }

    100% {
        opacity: 1;
    }
}

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.login-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 255, 65, 0.1);
    animation: scanline 8s linear infinite;
    z-index: 1000;
    pointer-events: none;
}

body {
    animation: flicker 0.2s infinite alternate;
}

/* Enhancements */
.card {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 0 0 5px rgba(0, 255, 65, 0.05);
}

.btn::before {
    content: '[';
    margin-right: 5px;
    opacity: 0.5;
}

.btn::after {
    content: ']';
    margin-left: 5px;
    opacity: 0.5;
}

/* File Icon Classes */
.icon-dir::before {
    content: '📁';
    margin-right: 10px;
}

.icon-file::before {
    content: '📄';
    margin-right: 10px;
}