:root {
    --bg-color: #f8f9fa;
    --container-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #dddddd;
    --item-border: #eeeeee;
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --tag-bg: #f1f1f1;
    --tag-badge-bg: #e7f3ff;
    --shadow: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #444444;
    --item-border: #444444;
    --primary-color: #3793ff;
    --secondary-color: #888888;
    --tag-bg: #3d3d3d;
    --tag-badge-bg: #1e3a5a;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: sans-serif;
    margin: 2rem;
    line-height: 1.6;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 80vw;
    margin: auto;
    background: var(--container-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
}

h1 {
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

h2 {
    margin-top: 0;
    text-align: center;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: var(--text-color);
}

input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
     padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #0056b3;
}

.reset-btn {
    text-decoration: none;
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 1rem;
    margin-left: 5px;
}

.tag-cloud {
    padding: 10px;
    background: var(--tag-bg);
    border-radius: 5px;
}

.tag-cloud a {
    display: inline-block;
    padding: 5px 10px;
    margin: 3px;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
}

.tag-cloud a.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.file-list{
	width:80%
}
.file-item {
    padding: 15px;
    border-bottom: 1px solid var(--item-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.file-info p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tag-badge {
    background: var(--tag-badge-bg);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-right: 5px;
    text-decoration: none;
}

.view-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
}

.admin-link {
    display: block;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}

.d-flex {
    display: flex;
	gap: 1rem;
}

.space-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

/* Dark Mode Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
	width: initial;
}

.theme-toggle:hover {
    background: var(--tag-bg);
}


.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 300px;
}

        .admin-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary-color); padding-bottom: 1rem; margin-bottom: 2rem; }
        .admin-header h1 { margin: 0; color: var(--text-color); }
        
        .toolbar { margin-bottom: 1.5rem; display: flex; gap: 10px; }
        .btn { padding: 10px 15px; border-radius: 4px; text-decoration: none; font-weight: bold; cursor: pointer; border: none; display: inline-block; font-size: 0.9rem; }
        .btn-row { display: flex; gap: 10px; margin-top: 1rem; }
        .btn-primary { background: #007bff; color: white; }
        .btn-secondary { background: #6c757d; color: white; }
        .btn-danger { background: #dc3545; color: white; }
        .btn-success { background: #28a745; color: white; }
        
        .file-table { width: 100%; border-collapse: collapse; }
        .file-table th, .file-table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
        .file-table th { background: #f1f1f1; color: #555; }
        .file-table tr:hover { background: #f9f9f9; }
        
        .tag { background: #e7f3ff; color: #007bff; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; margin-right: 4px; }
        
        /* Toggle Badges */
        .status-badge { padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; color: white; font-weight: bold; cursor: pointer; border: none; transition: opacity 0.2s; }
        .status-badge:hover { opacity: 0.8; }
        .status-active { background: #28a745; }
        .status-inactive { background: #dc3545; }
        .vis-public { background: #007bff; }
        .vis-hidden { background: #6c757d; }
        
        .temp-link-box { background: #fff9db; border: 1px solid #fab005; padding: 10px; font-size: 0.85rem; margin-top: 8px; border-radius: 4px; word-break: break-all; }
        .temp-link-box code { background: #fff; padding: 2px 5px; border: 1px solid #ddd; border-radius: 3px; display: block; margin: 5px 0; 
overflow:scroll hidden;    white-space: pre-line;height:34px}
        .copy-btn { background: #fab005; color: #333; border: none; padding: 3px 8px; border-radius: 3px; cursor: pointer; font-size: 0.75rem; font-weight: bold; }
        .copy-btn:hover { background: #f08c00; }
        
        .actions { white-space: nowrap; }
        .actions a { margin-right: 8px; color: #007bff; text-decoration: none; }
        .actions a:hover { text-decoration: underline; }
        .actions .delete { color: #dc3545; }
        
        .toggle-form { display: inline; }
        .edit-header { border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
        .edit-header h2 { margin: 0; color: var(--text-color); }
        
        .form-group { margin-bottom: 1rem; }
        label { display: block; font-weight: bold; margin-bottom: 5px; }
        input[type="text"], select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
        
        #editor { width: 100%; height: 600px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 1rem; }
        textarea#content { display: none; }
        
        
        .error { color: #dc3545; background: #fff5f5; padding: 10px; border-radius: 4px; margin-bottom: 1rem; border: 1px solid #ffc9c9; }


.search-box {
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 60%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--container-bg);
    color: var(--text-color);
}

.search-box button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
