/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8f9fa;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: #fff;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-brand {
    padding: 0 20px 20px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand i {
    color: #007bff;
    font-size: 24px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.sidebar-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
}

.sidebar-menu-item:hover {
    background: #f1f3f5;
    color: #007bff;
}

.sidebar-menu-item:hover i {
    color: #007bff;
}

.sidebar-menu-item.active {
    background: #e7f3ff;
    color: #007bff;
    border-left-color: #007bff;
}

.sidebar-menu-item.active i {
    color: #007bff;
}

.sidebar-menu-item .icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.sidebar-menu-item .icon i {
    font-size: 18px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
}

.sidebar-footer .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-footer .avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-footer .profile-text {
    font-weight: 500;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Основной контент - занимает всю высоту */
.main-content {
    flex: 1;
    padding: 24px;
    overflow: auto;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.main-content h1 {
    margin-bottom: 24px;
    font-size: 28px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.main-content h1 i {
    color: #007bff;
}

/* Страница хранилища */
.storage-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
}

.breadcrumb-item {
    cursor: pointer;
    color: #007bff;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.breadcrumb-item i {
    font-size: 12px;
}

.breadcrumb-item:hover {
    background: #e7f3ff;
}

.breadcrumb-item.active {
    color: #495057;
    cursor: default;
}

.breadcrumb-item.active:hover {
    background: transparent;
}

.breadcrumb-separator {
    color: #6c757d;
    padding: 0 2px;
    flex-shrink: 0;
}

.breadcrumb-separator i {
    font-size: 10px;
}

.storage-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.storage-actions button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    background: #f1f3f5;
    color: #495057;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.storage-actions button:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.storage-actions button.primary {
    background: #007bff;
    color: #fff;
}

.storage-actions button.primary:hover {
    background: #0056b3;
}

/* Обертка для сетки - занимает все свободное место */
.file-grid-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
}

/* Сетка файлов - занимает всю высоту wrapper */
.file-grid {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow-y: auto;
    align-content: start;
    position: relative;
    transition: background 0.3s;
}

/* Элементы сетки - строго квадратные */
.file-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
    
    /* Строго квадратные */
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    max-width: 180px;
    max-height: 180px;
    min-width: 80px;
    min-height: 80px;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Центрирование содержимого */
    justify-self: center;
    align-self: center;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.file-item .file-icon {
    margin-bottom: 8px;
    line-height: 1;
    flex-shrink: 0;
}

.file-item .file-icon i {
    font-size: 42px;
}

.file-item .file-name {
    font-size: 13px;
    word-break: break-all;
    line-height: 1.3;
    max-height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
    flex-shrink: 0;
}

.file-item .file-size {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
    flex-shrink: 0;
}

.file-item.folder .file-icon i {
    color: #ffc107;
}

.file-item .file-icon i.fa-file-alt {
    color: #007bff;
}

/* Адаптивность для разных размеров экрана */
@media (max-width: 1200px) {
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
        padding: 14px;
    }
    .file-item .file-icon i {
        font-size: 36px;
    }
    .file-item {
        max-width: 160px;
        max-height: 160px;
        min-width: 70px;
        min-height: 70px;
        padding: 14px 10px;
    }
    .file-item .file-name {
        font-size: 12px;
        max-height: 32px;
    }
}

@media (max-width: 992px) {
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        padding: 12px;
    }
    .file-item .file-icon i {
        font-size: 32px;
    }
    .file-item {
        max-width: 140px;
        max-height: 140px;
        min-width: 60px;
        min-height: 60px;
        padding: 12px 8px;
        border-radius: 6px;
    }
    .file-item .file-name {
        font-size: 12px;
        max-height: 30px;
    }
    .file-item .file-size {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 12px 0;
    }
    
    .sidebar-brand {
        font-size: 0;
        padding: 0 0 16px;
        justify-content: center;
    }
    
    .sidebar-brand i {
        font-size: 24px;
    }
    
    .sidebar-menu-item {
        padding: 12px;
        justify-content: center;
        gap: 0;
    }
    
    .sidebar-menu-item span:not(.icon) {
        display: none;
    }
    
    .sidebar-menu-item .icon {
        margin: 0;
    }
    
    .sidebar-menu-item .icon i {
        font-size: 20px;
    }
    
    .sidebar-footer {
        padding: 12px;
        justify-content: center;
    }
    
    .sidebar-footer .profile-text {
        display: none;
    }
    
    .sidebar-footer .avatar,
    .sidebar-footer .avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .main-content {
        padding: 16px;
        height: 100vh;
        max-height: 100vh;
    }
    
    .main-content h1 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .storage-container {
        padding: 12px;
        border-radius: 8px;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        padding: 10px;
    }
    
    .file-item {
        max-width: 120px;
        max-height: 120px;
        min-width: 60px;
        min-height: 60px;
        padding: 10px 6px;
        border-radius: 6px;
    }
    
    .file-item .file-icon i {
        font-size: 28px;
    }
    
    .file-item .file-name {
        font-size: 11px;
        max-height: 28px;
        -webkit-line-clamp: 2;
    }
    
    .file-item .file-size {
        font-size: 10px;
    }
    
    .storage-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .breadcrumbs {
        font-size: 13px;
        overflow-x: auto;
        white-space: nowrap;
        padding: 4px 0;
        flex-wrap: nowrap;
    }
    
    .breadcrumbs::-webkit-scrollbar {
        height: 2px;
    }
    
    .breadcrumbs::-webkit-scrollbar-thumb {
        background: #c1c7cd;
        border-radius: 2px;
    }
    
    .storage-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .storage-actions button {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .storage-actions button span {
        display: none;
    }
    
    .login-container {
        margin: 40px 16px;
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .context-menu {
        min-width: 160px;
    }
    
    .context-menu-item {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .main-content h1 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .storage-container {
        padding: 8px;
        border-radius: 6px;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
        padding: 8px;
    }
    
    .file-item {
        max-width: 100px;
        max-height: 100px;
        min-width: 50px;
        min-height: 50px;
        padding: 8px 4px;
        border-radius: 4px;
    }
    
    .file-item .file-icon i {
        font-size: 24px;
    }
    
    .file-item .file-name {
        font-size: 10px;
        max-height: 24px;
        -webkit-line-clamp: 2;
    }
    
    .file-item .file-size {
        font-size: 9px;
        margin-top: 2px;
    }
    
    .storage-header {
        gap: 6px;
    }
    
    .breadcrumbs {
        font-size: 12px;
    }
    
    .storage-actions button {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .storage-actions button i {
        font-size: 14px;
    }
    
    .storage-actions button span {
        display: none;
    }
}

/* Стили для скроллбара в file-grid */
.file-grid::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.file-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.file-grid::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 3px;
}

.file-grid::-webkit-scrollbar-thumb:hover {
    background: #a8b0b8;
}

/* Drag & drop overlay */
.file-grid.drag-over {
    background: #e7f3ff;
    border: 2px dashed #007bff;
}

/* Пустое состояние */
.file-grid .empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6c757d;
    height: 100%;
    min-height: 300px;
}

.file-grid .empty-state .icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.file-grid .empty-state .title {
    font-size: 18px;
    font-weight: 500;
}

.file-grid .empty-state .subtitle {
    font-size: 14px;
    margin-top: 8px;
    color: #adb5bd;
}

/* Загрузка */
.file-grid .loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6c757d;
    height: 100%;
    min-height: 300px;
}

.file-grid .loading-state .spinner {
    font-size: 48px;
    margin-bottom: 16px;
    color: #007bff;
}

.file-grid .loading-state .text {
    font-size: 16px;
}

/* Контекстное меню */
.context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 6px 0;
    z-index: 1000;
    animation: menuFadeIn 0.15s ease;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-menu-item i {
    width: 20px;
    color: #495057;
    font-size: 14px;
    text-align: center;
}

.context-menu-item:hover {
    background: #f1f3f5;
}

.context-menu-item:hover i {
    color: #007bff;
}

/* Формы авторизации */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 32px;
    color: #1a1a2e;
    font-size: 28px;
}

.login-container h2 i {
    color: #007bff;
    margin-right: 12px;
}

.login-container h2 .logo {
    color: #007bff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.form-group label i {
    margin-right: 6px;
    color: #6c757d;
    width: 16px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

.form-group input:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

.btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn i {
    font-size: 16px;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #1e7e34;
}

/* Страница профиля */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-container h1 {
    flex-shrink: 0;
}

.profile-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 32px;
    flex: 1;
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 32px;
}

.profile-avatar-section .avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
    margin-bottom: 12px;
}

.profile-avatar-section .avatar-preview-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 600;
    color: #fff;
    margin: 0 auto 12px;
}

.profile-avatar-section input[type="file"] {
    display: none;
}

.profile-avatar-section .upload-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #007bff;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.profile-avatar-section .upload-btn i {
    margin-right: 8px;
}

.profile-avatar-section .upload-btn:hover {
    background: #0056b3;
}

/* Статистика на дашборде */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .number {
    font-size: 36px;
    font-weight: 700;
    color: #007bff;
    line-height: 1.2;
}

.stat-card .label {
    color: #6c757d;
    margin-top: 6px;
    font-size: 14px;
}

.stat-card .icon {
    margin-bottom: 8px;
}

.stat-card .icon i {
    font-size: 32px;
}

/* Сообщения */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert i {
    font-size: 16px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-success i {
    color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-error i {
    color: #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-info i {
    color: #17a2b8;
}

/* Страница безопасности */
.security-section {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.security-section h3 {
    margin-bottom: 16px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-section h3 i {
    font-size: 20px;
}

.security-section .form-group {
    margin-bottom: 16px;
}

/* Адаптивность для безопасности и профиля */
@media (max-width: 768px) {
    .profile-container {
        padding: 0;
    }
    
    .profile-card {
        padding: 20px;
    }
    
    .security-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .profile-card {
        padding: 16px;
    }
    
    .security-section {
        padding: 12px;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px;
    }
}

/* Стили для скроллбара */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8b0b8;
}

/* Дополнительные стили для иконок */
.fa-spinner {
    animation: fa-spin 1s infinite linear;
}

/* Стили для тултипов */
[title] {
    position: relative;
}

/* Стили для кнопок с иконками */
button i {
    pointer-events: none;
}

/* Стили для ссылок с иконками */
a i {
    pointer-events: none;
}

/* Стили для пустого состояния в хранилище */
.storage-container .file-grid .empty-state .icon i {
    font-size: 64px;
}

/* Стили для заголовка панели управления */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* Модальное окно для шаринга */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: #007bff;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f3f5;
    color: #dc3545;
}

.modal-body {
    padding: 24px;
}

.share-icon {
    text-align: center;
    margin-bottom: 16px;
}

.share-icon i {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 50%;
}

.share-text {
    text-align: center;
    font-size: 16px;
    color: #495057;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.share-url-container {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e9ecef;
}

.share-url-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1a1a2e;
    outline: none;
    font-family: monospace;
}

.share-url-input:focus {
    outline: none;
}

.share-copy-btn {
    padding: 8px 14px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-copy-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.share-copy-btn i {
    font-size: 18px;
}

.share-info {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #6c757d;
}

.share-info i {
    margin-right: 4px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-footer .btn {
    width: auto;
    padding: 8px 20px;
    font-size: 14px;
}

.modal-footer .btn-primary {
    background: #007bff;
    color: #fff;
}

.modal-footer .btn-primary:hover {
    background: #0056b3;
}

.modal-footer .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.modal-footer .btn-secondary:hover {
    background: #5a6268;
}

/* Анимация копирования */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.share-copy-btn.success {
    animation: copySuccess 0.3s ease;
}

/* Адаптивность модального окна */
@media (max-width: 480px) {
    .modal {
        width: 95%;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 16px 20px;
    }
    
    .share-url-container {
        flex-direction: column;
    }
    
    .share-url-input {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .share-copy-btn {
        padding: 8px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}