:root {
    --bg-color: #0f172a;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --card-bg: rgba(30, 41, 59, 0.5);
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    min-height: 100vh;
    display: flex;
}

/* Sidebar Styling */
aside {
    width: 300px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

.doc-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doc-item {
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
}

.doc-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.doc-item.active {
    background: var(--accent-color);
    color: #000;
    font-weight: 600;
}

.new-btn {
    padding: 0.75rem;
    background: var(--accent-color);
    color: #0f172a;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.new-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

/* Main Content Area */
main {
    flex: 1;
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.editor-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    letter-spacing: -0.025em;
}

.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

textarea {
    width: 100%;
    min-height: 600px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    color: var(--text-primary);
    font-size: 1.125rem;
    line-height: 1.75;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.save-btn {
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: #0f172a;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    float: right;
}

.save-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.view-mode h2 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
}

.view-content {
    background: rgba(15, 23, 42, 0.3);
    padding: 2.5rem;
    border-radius: 16px;
    line-height: 1.8;
    color: #cbd5e1;
    white-space: pre-wrap;
    min-height: 50vh;
}

.top-meta {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
}

.json-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
}

.json-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    gap: 2rem;
}

.editor-header h1 {
    margin-bottom: 0;
}

.management-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
}
 / *   S c r o l l b a r   s t y l i n g   * / 
 : : - w e b k i t - s c r o l l b a r   { 
         w i d t h :   8 p x ; 
 } 
 
 : : - w e b k i t - s c r o l l b a r - t r a c k   { 
         b a c k g r o u n d :   v a r ( - - b g - c o l o r ) ; 
 } 
 
 : : - w e b k i t - s c r o l l b a r - t h u m b   { 
         b a c k g r o u n d :   v a r ( - - g l a s s - b o r d e r ) ; 
         b o r d e r - r a d i u s :   4 p x ; 
 } 
 
 : : - w e b k i t - s c r o l l b a r - t h u m b : h o v e r   { 
         b a c k g r o u n d :   v a r ( - - t e x t - s e c o n d a r y ) ; 
 } 
  
 
/* Logout button */
.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    background: rgba(239, 68, 68, 0.05);
    transition: all 0.2s;
    margin-top: auto;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Download All button */
.download-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.07);
    transition: all 0.2s;
}

.download-all-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
    transform: translateY(-1px);
}
