Files
Trashbox/style.css
2026-07-24 21:16:00 +08:00

968 lines
20 KiB
CSS
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
:root {
--bg-primary: #f8f9fa;
--bg-secondary: #ffffff;
--bg-header: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--text-primary: #333333;
--text-secondary: #5f6368;
--text-muted: #6c757d;
--border-color: #e9ecef;
--border-light: #f1f3f4;
--accent-blue: #1a73e8;
--accent-green: #188038;
--hover-bg: #f8f9fa;
--shadow: 0 2px 4px rgba(0,0,0,0.1);
/* === ПЕРЕМЕННЫЕ ДЛЯ МОДАЛКИ === */
--modal-bg: #ffffff;
--modal-text: #333333;
--modal-header-bg: #f8f9fa;
--modal-border: #e9ecef;
}
.dark-theme {
--bg-primary: #121212;
--bg-secondary: #1e1e1e;
--bg-header: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
--text-primary: #e0e0e0;
--text-secondary: #a0a0a0;
--text-muted: #888888;
--border-color: #2d3748;
--border-light: #2d3748;
--accent-blue: #63b3ed;
--accent-green: #68d391;
--hover-bg: #2d3748;
--shadow: 0 2px 4px rgba(0,0,0,0.3);
/* === ПЕРЕМЕННЫЕ ДЛЯ МОДАЛКИ В ТЁМНОЙ ТЕМЕ === */
--modal-bg: #1e1e1e;
--modal-text: #e0e0e0;
--modal-header-bg: #2d3748;
--modal-border: #2d3748;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
line-height: 1.6;
min-height: 100vh;
transition: none;
}
body.loaded * {
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.container {
max-width: 100%;
margin: 0 auto;
background: var(--bg-secondary);
min-width: 320px;
min-height: 100vh;
box-shadow: var(--shadow);
}
@media (min-width: 768px) {
.container {
max-width: 1000px;
margin: 10px auto;
min-height: auto;
border-radius: 8px;
overflow: hidden;
}
}
.theme-toggle {
position: fixed;
top: 10px;
right: 10px;
background: rgba(255,255,255,0.2);
border: none;
border-radius: 50%;
width: 50px;
height: 50px;
font-size: 1.3rem;
cursor: pointer;
z-index: 1000;
backdrop-filter: blur(10px);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.dark-theme .theme-toggle {
background: rgba(0,0,0,0.2);
color: var(--text-primary);
}
.scroll-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background: var(--accent-blue);
color: white;
border: none;
border-radius: 50%;
font-size: 1.3rem;
cursor: pointer;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
z-index: 1000;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
display: flex;
align-items: center;
justify-content: center;
}
.scroll-top.visible {
opacity: 1;
visibility: visible;
}
.scroll-top:hover {
background: var(--accent-green);
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.theme-toggle:hover {
transform: scale(1.1);
background: rgba(255,255,255,0.3);
}
.dark-theme .theme-toggle:hover {
background: rgba(0,0,0,0.3);
}
.header {
background: var(--bg-header);
color: white;
padding: 1.5rem 1rem;
text-align: center;
position: relative;
}
h1 {
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 0.5rem;
}
.content {
padding: 1rem;
min-width: 0;
}
.breadcrumb {
background: var(--bg-primary);
padding: 1rem;
margin: 0 0 1rem 0;
border-bottom: 1px solid var(--border-color);
font-size: 0.9rem;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.breadcrumb a {
color: var(--accent-blue);
text-decoration: none;
font-weight: 500;
display: inline-block;
}
.breadcrumb a:hover {
text-decoration: underline;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
li {
padding: 1rem 0.5rem;
border-bottom: 1px solid var(--border-light);
display: flex;
align-items: center;
flex-wrap: nowrap;
}
li:last-child { border-bottom: none; }
li:hover {
background-color: var(--hover-bg);
}
/* Стили для строки файла */
.file-row {
display: flex;
align-items: center;
justify-content: space-between;
flex-grow: 1;
min-width: 0;
gap: 1rem;
flex-wrap: nowrap;
}
.file-link {
color: var(--accent-blue);
font-weight: 500;
text-decoration: none;
display: flex;
align-items: center;
flex-grow: 1;
min-width: 0;
}
.dir-link {
color: var(--accent-green);
font-weight: 600;
text-decoration: none;
display: flex;
align-items: center;
flex-grow: 1;
}
.file-controls {
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
flex-wrap: nowrap;
}
.file-meta {
color: var(--text-muted);
font-size: 0.85rem;
font-weight: 600;
white-space: nowrap;
text-align: right;
font-variant-numeric: tabular-nums;
}
.file-meta.date {
min-width: 90px;
}
.file-meta.size {
min-width: 70px;
}
@media (max-width: 768px) {
.file-meta {
font-size: 0.7rem;
}
.file-meta.date {
min-width: 75px;
}
.file-meta.size {
min-width: 60px;
}
}
@media (max-width: 480px) {
.file-meta.date {
display: none !important;
}
.file-meta.size {
font-size: 0.65rem;
min-width: 50px;
}
}
.file-icon {
margin-right: 0.75rem;
font-size: 1.3rem;
flex-shrink: 0;
width: 24px;
text-align: center;
}
.file-name {
flex-grow: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.95rem;
}
.section-title {
color: var(--text-secondary);
font-size: 0.9rem;
font-weight: 600;
margin: 1.5rem 0 0.5rem 0;
padding: 0.75rem 0.5rem;
border-bottom: 2px solid var(--border-light);
text-transform: uppercase;
letter-spacing: 0.5px;
background: var(--bg-primary);
}
.stats {
text-align: center;
color: var(--text-secondary);
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-color);
font-size: 0.9rem;
}
.empty-state {
text-align: center;
padding: 3rem 1rem;
color: var(--text-secondary);
}
.empty-state .icon {
font-size: 3rem;
margin-bottom: 1rem;
opacity: 0.5;
}
.footer {
background: var(--bg-primary);
border-top: 1px solid var(--border-color);
padding: 1rem;
text-align: center;
color: var(--text-secondary);
font-size: 0.9rem;
}
.footer-content {
max-width: 1000px;
margin: 0 auto;
text-align: center;
}
.footer-content span,
.footer-content a {
display: inline;
vertical-align: baseline;
}
.footer-link {
color: var(--accent-blue);
text-decoration: none;
font-weight: 500;
transition: opacity 0.2s ease;
margin-left: 0.3rem;
}
.footer-link:hover {
opacity: 0.8;
text-decoration: underline;
}
/* ================================================
ЕДИНЫЙ СТИЛЬ ДЛЯ ВСЕХ КНОПОК
================================================ */
.preview-btn, .copy-btn, .download-btn {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--border-color);
border-radius: 6px;
width: 32px;
height: 32px;
cursor: pointer;
font-size: 0.85rem;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
opacity: 0.7;
flex-shrink: 0;
}
.preview-btn:hover, .copy-btn:hover, .download-btn:hover {
background: var(--accent-blue);
color: white;
border-color: var(--accent-blue);
opacity: 1;
transform: scale(1.05);
}
/* ================================================
ТУЛБАР (поиск + сортировка)
================================================ */
.toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 1rem;
padding: 0.75rem 0.5rem;
margin-bottom: 1rem;
background: var(--bg-primary);
border-radius: 0px;
border: 1px solid var(--border-color);
}
.search-box {
flex: 1 1 200px;
min-width: 150px;
}
.search-box form {
display: flex;
gap: 0.5rem;
}
.search-box input[type="text"] {
flex: 1;
padding: 0.5rem 0.75rem;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--bg-secondary);
color: var(--text-primary);
font-size: 0.9rem;
min-width: 100px;
}
.search-box input[type="text"]:focus {
outline: none;
border-color: var(--accent-blue);
}
.search-box button {
padding: 0.5rem 1rem;
background: var(--accent-blue);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
white-space: nowrap;
}
.search-box button:hover {
background: var(--accent-green);
}
.sort-buttons {
display: flex;
align-items: center;
gap: 0.3rem;
flex-wrap: wrap;
}
.sort-label {
font-size: 0.8rem;
color: var(--text-secondary);
font-weight: 500;
margin-right: 0.2rem;
white-space: nowrap;
}
.sort-btn {
padding: 0.4rem 0.75rem;
background: var(--bg-secondary);
color: var(--text-secondary);
border: 1px solid var(--border-color);
border-radius: 6px;
text-decoration: none;
font-size: 0.8rem;
transition: all 0.2s ease;
white-space: nowrap;
}
.sort-btn:hover {
background: var(--hover-bg);
border-color: var(--accent-blue);
}
.sort-btn.active {
background: var(--accent-blue);
color: white;
border-color: var(--accent-blue);
}
/* ================================================
Стили для формы ввода пароля
================================================ */
.password-form-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 400px;
padding: 2rem;
}
.password-form {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 2rem;
max-width: 400px;
width: 100%;
text-align: center;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.password-form .lock-icon {
font-size: 3rem;
margin-bottom: 1rem;
display: block;
}
.password-form h2 {
font-size: 1.3rem;
margin-bottom: 0.5rem;
color: var(--text-primary);
}
.password-form p {
color: var(--text-secondary);
margin-bottom: 1.5rem;
font-size: 0.95rem;
}
.password-form p strong {
color: var(--text-primary);
word-break: break-all;
}
.password-form form {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.password-form input[type="password"] {
padding: 0.75rem 1rem;
border: 2px solid var(--border-color);
border-radius: 8px;
font-size: 1rem;
background: var(--bg-primary);
color: var(--text-primary);
transition: border-color 0.2s ease;
width: 100%;
box-sizing: border-box;
}
.password-form input[type="password"]:focus {
outline: none;
border-color: var(--accent-blue);
}
.password-form button {
padding: 0.75rem;
background: var(--accent-blue);
color: white;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s ease;
}
.password-form button:hover {
background: var(--accent-green);
}
.password-form .error-msg {
color: #dc3545;
font-size: 0.9rem;
min-height: 1.5rem;
margin: 0.25rem 0;
}
.password-form .back-link {
display: inline-block;
margin-top: 0.75rem;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.9rem;
}
.password-form .back-link:hover {
color: var(--accent-blue);
text-decoration: underline;
}
/* Стиль для защищенной папки */
.protected-folder {
position: relative;
}
/* ================================================
Модальное окно предпросмотра
================================================ */
.preview-modal {
display: none;
position: fixed;
z-index: 2000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.8);
backdrop-filter: blur(5px);
overflow: auto;
}
.preview-content {
background: var(--bg-secondary);
margin: 2% auto;
padding: 0;
border-radius: 8px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
display: flex;
flex-direction: column;
overflow: hidden;
transition: all 0.3s ease;
}
.preview-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
border-bottom: 1px solid var(--border-color);
background: var(--bg-primary);
flex-shrink: 0;
}
.preview-title {
font-weight: 600;
color: var(--text-primary);
margin: 0;
flex-grow: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-right: 1rem;
}
.close-preview {
background: #dc3545;
color: white;
border: none;
border-radius: 4px;
width: 36px;
height: 36px;
cursor: pointer;
font-size: 1.2rem;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s ease;
}
.close-preview:hover {
background: #c82333;
}
.preview-iframe {
flex-grow: 1;
border: none;
background: white;
min-height: 0;
}
.preview-iframe.pdf {
background: var(--bg-primary);
}
.preview-image-container {
display: flex;
align-items: center;
justify-content: center;
flex-grow: 1;
padding: 10px;
background: var(--bg-primary);
overflow: hidden;
width: 100%;
height: 100%;
}
.preview-image {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0,0,0,0.2);
display: block;
}
.preview-modal::-webkit-scrollbar {
width: 8px;
}
.preview-modal::-webkit-scrollbar-track {
background: rgba(255,255,255,0.1);
}
.preview-modal::-webkit-scrollbar-thumb {
background: rgba(255,255,255,0.3);
border-radius: 4px;
}
.preview-modal::-webkit-scrollbar-thumb:hover {
background: rgba(255,255,255,0.5);
}
#copyNotification {
position: fixed;
bottom: 80px;
left: 50%;
transform: translateX(-50%);
background: var(--accent-green);
color: white;
padding: 12px 24px;
border-radius: 8px;
font-weight: 600;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
z-index: 3000;
transition: opacity 0.3s;
opacity: 1;
}
/* ================================================
Адаптивность
================================================ */
@media (max-width: 768px) {
.preview-content {
margin: 2.5% auto;
}
.preview-header {
padding: 0.75rem;
}
.preview-title {
font-size: 0.9rem;
}
.preview-image-container {
padding: 5px;
}
li {
padding: 0.5rem 0.25rem !important;
flex-wrap: nowrap !important;
}
.file-row {
flex-wrap: nowrap !important;
gap: 0.3rem !important;
}
.file-controls {
flex-wrap: nowrap !important;
gap: 0.15rem !important;
}
.file-meta.date {
min-width: 60px !important;
}
.file-meta.size {
min-width: 50px !important;
font-size: 0.65rem !important;
}
.toolbar {
flex-wrap: wrap !important;
gap: 0.5rem !important;
padding: 0.5rem !important;
}
.search-box {
flex: 1 1 100% !important;
min-width: 0 !important;
}
.sort-buttons {
flex-wrap: wrap !important;
justify-content: center !important;
}
}
@media (max-width: 480px) {
.toolbar {
flex-direction: column !important;
align-items: stretch !important;
gap: 0.5rem !important;
padding: 0.5rem !important;
}
.search-box {
width: 100% !important;
min-width: 0 !important;
flex: 1 1 auto !important;
}
.search-box form {
flex-wrap: nowrap !important;
width: 100% !important;
}
.search-box input[type="text"] {
flex: 1 1 auto !important;
min-width: 60px !important;
font-size: 0.85rem !important;
padding: 0.5rem 0.6rem !important;
}
.search-box button {
flex: 0 0 auto !important;
font-size: 0.8rem !important;
padding: 0.4rem 0.7rem !important;
white-space: nowrap !important;
}
.sort-buttons {
display: flex !important;
flex-wrap: wrap !important;
justify-content: center !important;
gap: 0.3rem !important;
width: 100% !important;
}
.sort-label {
font-size: 0.65rem !important;
width: 100% !important;
text-align: center !important;
margin-right: 0 !important;
}
.sort-btn {
flex: 0 1 auto !important;
font-size: 0.65rem !important;
padding: 0.25rem 0.4rem !important;
white-space: nowrap !important;
}
.preview-btn, .copy-btn, .download-btn {
width: 26px !important;
height: 26px !important;
font-size: 0.65rem !important;
padding: 0 !important;
}
.file-meta.date {
display: none !important;
}
.file-meta.size {
font-size: 0.55rem !important;
min-width: 35px !important;
}
.file-name {
font-size: 0.75rem !important;
}
.file-icon {
font-size: 1rem !important;
width: 18px !important;
margin-right: 0.3rem !important;
}
.file-controls {
gap: 0.1rem !important;
}
li {
padding: 0.3rem 0.15rem !important;
}
.file-row {
gap: 0.15rem !important;
}
.theme-toggle {
top: 5px;
right: 5px;
width: 45px;
height: 45px;
font-size: 1.2rem;
}
.scroll-top {
bottom: 15px;
right: 15px;
width: 45px;
height: 45px;
font-size: 1.2rem;
}
.header {
padding: 1rem 0.5rem;
}
h1 {
font-size: 1.5rem;
padding: 0 0.5rem;
}
.content {
padding: 0.5rem;
}
.breadcrumb {
padding: 0.5rem;
font-size: 0.8rem;
}
.section-title {
font-size: 0.8rem;
padding: 0.4rem;
margin: 0.75rem 0 0.25rem 0;
}
.footer {
padding: 0.5rem;
font-size: 0.8rem;
}
.preview-content {
margin: 1% auto;
border-radius: 4px;
}
.preview-image-container {
padding: 2px;
}
.preview-image {
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
#copyNotification {
bottom: 60px;
padding: 8px 16px;
font-size: 0.85rem;
}
}
@media (max-width: 360px) {
.container {
min-width: 100%;
margin: 0;
}
.file-name {
font-size: 0.7rem !important;
}
.file-meta.size {
font-size: 0.5rem !important;
min-width: 28px !important;
}
.preview-btn, .copy-btn, .download-btn {
width: 20px !important;
height: 20px !important;
font-size: 0.5rem !important;
}
.search-box input[type="text"] {
font-size: 0.75rem !important;
padding: 0.3rem 0.4rem !important;
min-width: 40px !important;
}
.search-box button {
font-size: 0.7rem !important;
padding: 0.3rem 0.5rem !important;
}
.sort-btn {
font-size: 0.6rem !important;
padding: 0.2rem 0.3rem !important;
}
}
/* ================================================
ПЕРЕОПРЕДЕЛЕНИЕ МОДАЛКИ (фикс темы)
================================================ */
.preview-content {
background: var(--modal-bg) !important;
color: var(--modal-text) !important;
border: 1px solid var(--modal-border) !important;
}
.preview-header {
background: var(--modal-header-bg) !important;
border-bottom: 1px solid var(--modal-border) !important;
}
.preview-title {
color: var(--modal-text) !important;
}
.preview-iframe {
background: var(--bg-primary) !important;
}
.preview-image-container {
background: var(--bg-primary) !important;
}