:root {
    --primary-color: #6366f1;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--primary-color); }

.header-icons { display: flex; align-items: center; gap: 20px; }
.header-icons span { cursor: pointer; color: var(--text-dim); transition: 0.3s; }
.header-icons span:hover { color: white; transform: scale(1.1); }

/* Layout */
.container { display: flex; min-height: calc(100vh - 70px); }

/* Sidebar */
.sidebar { width: 260px; padding: 30px 20px; background: rgba(15, 23, 42, 0.4); border-right: 1px solid var(--glass-border); }

.btn-new {
    width: 100%; padding: 14px; border-radius: 12px; border: none;
    background: var(--primary-color); color: white; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 10px; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); transition: 0.3s;
}
.btn-new:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* Main Content */
.main-content { flex-grow: 1; padding: 40px; }

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.file-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: 0.3s;
    cursor: default;
}

.file-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.file-card .file-icon {
    font-size: 50px; margin-bottom: 15px;
    background: linear-gradient(45deg, #818cf8, #6366f1);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.file-name { font-size: 14px; font-weight: 500; text-align: center; margin-bottom: 15px; width: 100%; overflow: hidden; text-overflow: ellipsis; }

.file-actions { display: flex; gap: 10px; width: 100%; justify-content: center; }
.file-actions span {
    font-size: 20px; cursor: pointer; color: var(--text-dim); transition: 0.2s;
}
.file-actions span:hover { color: white; }
.file-actions .del-icon:hover { color: #ef4444; }

/* Auth & Modals */
.auth-container { height: 100vh; display: flex; justify-content: center; align-items: center; }
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    display: none; justify-content: center; align-items: center; z-index: 1000;
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: #1e1b4b; padding: 40px; border-radius: 24px;
    border: 1px solid var(--glass-border); width: 100%; max-width: 350px; text-align: center;
}

input {
    width: 100%; padding: 12px; margin: 10px 0; border-radius: 10px;
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05);
    color: white; outline: none;
}
input:focus { border-color: var(--primary-color); }

.btn-primary {
    width: 100%; padding: 12px; background: var(--primary-color);
    border: none; color: white; border-radius: 10px; cursor: pointer; font-weight: 600;
}

.close-btn { margin-top: 15px; background: transparent; border: none; color: var(--text-dim); cursor: pointer; }
/* Стили для индикатора памяти */
.sidebar {
    display: flex;
    flex-direction: column;
}

.storage-info {
    margin-top: auto; /* Прижимает блок к низу сайдбара */
    padding: 20px;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.storage-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    transition: width 0.5s ease;
}

.storage-info p {
    font-size: 11px;
    color: var(--text-dim);
}