.ym-informer {
    width: 88px;
    height: 31px;
    border: 0;
}

/* Общие сбросы */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Шапка в стиле miku-bs.ru (тёмная, с крупными элементами) */
.site-header {
    background: #1a1a1a;
    color: white;
    padding: 0.8rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logotype img {
    height: 100px;
    width: auto;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.site-branding-container:hover .site-title {
    font-weight: 500;
    letter-spacing: 1px;
}

.site-branding-container:hover .site-description {
    font-weight: 500;
    letter-spacing: 1px;
}

.ocr-link {
  text-decoration: none;
  color: white;
}

.ocr-link:hover {
    color: #539b70;
}

.miku-link {
  text-decoration: none;
  color: white;
}

.miku-link:hover {
    color: #539b70;
}

.site-description {
    font-size: 1.1rem;
    opacity: 0.8;
}

.header-container h1 {
    font-weight: 500;
    letter-spacing: 1px;
    margin: 0;
}
.header-container h1:hover {
    font-weight: 600;
    letter-spacing: 3px;
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Хлебные крошки */
.breadcrumbs {
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 2rem;
    font-size: 0.95rem;
}

.breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Контейнер плиток */
.tile-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

/* Плитка */
.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: none;
    width: 100%;
    position: relative; /* для позиционирования кнопки копирования */
}

.tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Иконки */
.tile-icon {
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 0.8rem;
}

.folder-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FFA000"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>');
}

.pdf-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23F44336"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v1.25c0 .41-.34.75-.75.75s-.75-.34-.75-.75V8c0-.55.45-1 1-1H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2c-.28 0-.5-.22-.5-.5v-5c0-.28.22-.5.5-.5h2c.83 0 1.5.67 1.5 1.5v3zm4-3.5V9c0 .28-.22.5-.5.5H18v1h1.5c.28 0 .5.22.5.5s-.22.5-.5.5H18v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5v-4c0-.28.22-.5.5-.5h2c.28 0 .5.22.5.5z"/></svg>');
}

/* Имя плитки */
.tile-name {
    width: 100%;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Кнопка копирования ссылки */
.copy-link-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.tile:hover .copy-link-btn {
    opacity: 1;
}

.copy-link-btn:hover {
    background: #fff;
    border-color: #999;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    height: 90%;
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-btn {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
}

.close-btn:hover {
    color: #000;
}

#pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
}

/* Пустая папка */
.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #777;
}

/* Уведомление (toast) */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    z-index: 2000;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}