:root {
    --bg-dark: #121212;
    --bg-panel: #1e1e1e;
    --accent: #4a90e2;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #333;
}

* { box-sizing: border-box; outline: none; }
body { margin: 0; font-family: 'Segoe UI', Inter, Roboto, sans-serif; background: var(--bg-dark); color: var(--text-main); height: 100vh; overflow: hidden; }

/* Navbar */
.navbar {
    height: 60px; background: var(--bg-panel); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 20px; justify-content: space-between;
}
.logo-section { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: #fff; cursor: pointer;}
.logo-icon { color: var(--accent); font-size: 24px; }
.light { font-weight: 300; color: var(--text-muted); }

.search-container {
    background: #121212; border: 1px solid var(--border); border-radius: 6px;
    padding: 8px 15px; display: flex; align-items: center; width: 400px; gap: 10px; opacity: 0.7; transition: 0.3s;
}
.search-container:hover { opacity: 1; border-color: #555; }
.search-container input { background: transparent; border: none; color: #fff; width: 100%; cursor: pointer;}

.user-profile { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.status-indicator { width: 8px; height: 8px; background: #ea4335; border-radius: 50%; box-shadow: 0 0 5px #ea4335; } /* Красный - нет доступа */
.avatar { font-size: 32px; color: #555; }

/* Layout */
.main-wrapper { display: flex; height: calc(100vh - 60px); }

/* Sidebar */
.sidebar { width: 250px; background: #181818; border-right: 1px solid var(--border); padding: 20px 0; display: flex; flex-direction: column; }
.nav-item {
    padding: 12px 25px; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; gap: 15px; font-size: 14px; transition: 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: rgba(74, 144, 226, 0.1); color: var(--accent); border-right: 3px solid var(--accent); }
.separator { margin: 15px 25px; border-top: 1px solid var(--border); }
.section-title { padding: 0 25px; font-size: 11px; font-weight: bold; color: #555; margin-bottom: 10px; letter-spacing: 1px; }

.storage-widget { padding: 0 25px; margin-top: auto; margin-bottom: 20px; }
.storage-text { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.progress-bar { height: 4px; background: #333; border-radius: 2px; overflow: hidden; }
.fill { width: 84%; height: 100%; background: var(--accent); }

/* Content */
.content-area { flex: 1; padding: 20px 30px; overflow-y: auto; }
.breadcrumbs { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.breadcrumbs .separator { font-size: 10px; }

.toolbar { display: flex; justify-content: space-between; margin-bottom: 20px; color: var(--text-muted); font-size: 14px; }
.sort-btn, .view-toggle i { cursor: pointer; transition: 0.2s; }
.sort-btn:hover, .view-toggle i:hover { color: #fff; }
.view-toggle { display: flex; gap: 15px; }
.view-toggle .active { color: #fff; }

/* Grid */
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

.file-card {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; position: relative;
}
.file-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); border-color: #555; }

.thumbnail { height: 130px; background: #000; position: relative; overflow: hidden; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: 0.3s; filter: grayscale(30%); }
.file-card:hover .thumbnail img { opacity: 1; filter: grayscale(0%); }

/* Оверлей замка на превью */
.lock-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    background: rgba(0,0,0,0.3);
}
.lock-overlay i { font-size: 24px; color: rgba(255,255,255,0.7); }

.file-type {
    position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.8);
    color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; font-weight: bold;
}

.file-info { padding: 12px; }
.file-name { font-size: 13px; font-weight: 500; color: #eee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.file-meta { font-size: 11px; color: #777; display: flex; justify-content: space-between; }

/* Modal */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px); z-index: 1000; display: none; justify-content: center; align-items: center;
}
.login-box {
    background: #1e1e1e; border: 1px solid #444; width: 380px; border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); overflow: hidden;
}
.login-header {
    background: #252525; padding: 15px 20px; border-bottom: 1px solid #333;
    display: flex; align-items: center; gap: 10px; color: #fff;
}
.login-header i { color: #ea4335; }
.login-body { padding: 25px; }
.warning-text { font-size: 13px; color: #bbb; line-height: 1.5; margin-bottom: 20px; text-align: center; }

.captcha-wrapper {
    background: #fff; border-radius: 4px; padding: 5px; display: flex; align-items: center; margin-bottom: 15px;
}
#refreshCaptcha {
    background: none; border: none; font-size: 18px; color: #555; cursor: pointer; padding: 0 10px;
}
.form-group input {
    width: 100%; background: #121212; border: 1px solid #444; padding: 12px; color: white; border-radius: 4px; font-size: 14px; text-align: center; letter-spacing: 2px;
}
.form-group input:focus { border-color: var(--accent); }

#verifyBtn {
    width: 100%; background: var(--accent); border: none; color: white; padding: 12px;
    border-radius: 4px; font-weight: 600; cursor: pointer; margin-top: 15px; transition: 0.2s;
}
#verifyBtn:hover { background: #357abd; }

.status-msg { margin-top: 15px; text-align: center; font-size: 13px; color: #ea4335; min-height: 20px; }
.loader-line { height: 2px; width: 100%; background: #333; margin-top: 10px; display: none; overflow: hidden; }
.loader-line::before {
    content: ''; display: block; height: 100%; background: var(--accent);
    animation: loading 1.5s infinite ease-in-out;
}
@keyframes loading { 0% { width: 0; margin-left: 0; } 50% { width: 50%; margin-left: 25%; } 100% { width: 0; margin-left: 100%; } }

.footer-links { margin-top: 20px; display: flex; justify-content: space-between; font-size: 11px; color: #555; cursor: pointer; }
.footer-links span:hover { text-decoration: underline; color: #888; }
