* {
    box-sizing: border-box;
    font-family: system-ui, 'Segoe UI', sans-serif;
}
body {
    margin: 0;
    background: #f0f2f5;
}
.login-container {
    max-width: 400px;
    margin: 80px auto;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.login-container h2 { margin-top: 0; }
.login-container input, .login-container button {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
}
.login-container button {
    background: #2c6e9e;
    color: white;
    font-weight: bold;
    cursor: pointer;
}
.error { color: #c00; background: #ffe0e0; padding: 10px; border-radius: 8px; }
.success { color: #0a0; background: #e0ffe0; padding: 10px; border-radius: 8px; }
.app { padding: 20px; max-width: 1400px; margin: 0 auto; }
.top-bar { text-align: right; padding: 10px; background: white; border-radius: 12px; margin-bottom: 20px; }
.logout { margin-left: 20px; text-decoration: none; background: #e74c3c; color: white; padding: 5px 12px; border-radius: 20px; }
.path-bar { background: #e9ecef; padding: 10px 15px; border-radius: 10px; margin-bottom: 20px; }
.actions { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.btn, button, .upload-btn { background: #2c6e9e; color: white; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { padding: 8px; border-radius: 6px; border: 1px solid #ccc; }
.view-toggle { margin-bottom: 20px; display: flex; gap: 10px; }
.view-toggle button { background: #ddd; color: black; }
.view-toggle button.active { background: #2c6e9e; color: white; }
.file-container { background: white; border-radius: 16px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.file-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #eee; gap: 15px; transition: 0.1s; }
.file-item:hover { background: #f8f9fa; }
.file-item .icon { font-size: 28px; width: 48px; text-align: center; }
.file-item .name { flex: 2; cursor: pointer; font-weight: 500; }
.file-item .details-list { flex: 2; color: #666; font-size: 0.9em; }
.actions-item { display: flex; gap: 8px; }
.rename-btn, .delete-btn { background: none; border: none; font-size: 1.2em; cursor: pointer; padding: 0 5px; }
.delete-btn { color: #e74c3c; }
.grid-view .file-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.grid-view .file-item { flex-direction: column; text-align: center; border: 1px solid #e0e0e0; border-radius: 12px; padding: 15px; background: white; }
.grid-view .file-item .icon { font-size: 48px; width: auto; }
.grid-view .file-item .details-list { font-size: 0.8em; }
.grid-view .actions-item { margin-top: 8px; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal-content { background: white; padding: 25px; border-radius: 20px; width: 90%; max-width: 400px; }
.close { float: right; font-size: 28px; cursor: pointer; }
.toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 20px; border-radius: 30px; color: white; animation: fadeout 3s forwards; z-index: 2000; }
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }
@keyframes fadeout { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (max-width: 700px) { .file-item { flex-wrap: wrap; } .details-list { width: 100%; margin-left: 48px; } }
.search-bar { position: relative; margin-bottom: 20px; }
#searchInput { width: 100%; padding: 12px; border-radius: 30px; border: 1px solid #ccc; font-size: 1em; }
.search-results { position: absolute; background: white; width: 100%; max-height: 300px; overflow-y: auto; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 100; display: none; }
.search-result-item { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; }
.search-result-item:hover { background: #f0f0f0; }
.search-result-path { font-size: 0.8em; color: #666; }

.preview-content { max-width: 90%; max-height: 90%; text-align: center; background: rgba(0,0,0,0.9); }
.preview-content img { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.preview-actions { margin-top: 15px; }
.preview-actions a { color: white; background: #2c6e9e; padding: 8px 16px; border-radius: 30px; text-decoration: none; }
.close-preview { color: white; font-size: 30px; position: absolute; right: 20px; top: 10px; cursor: pointer; }