/* Сброс стилей и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Основной контейнер Admin Panel */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Заголовок Admin Panel */
.admin-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-header p {
    color: #cccccc;
    font-size: 16px;
}

/* Навигация Admin Panel */
.admin-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 15px 0;
}

.nav-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cccccc;
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
    justify-content: center;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.nav-btn.active {
    background: linear-gradient(135deg, #333333 0%, #444444 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-btn i {
    font-size: 16px;
}

/* Секции Admin Panel */
.admin-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.admin-section.active {
    display: block;
}

/* Заголовки секций */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.add-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* Формы добавления */
.add-form {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease-out;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.add-form.hidden {
    display: none;
}

.add-form h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* Группы форм */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cccccc;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #888888;
}

/* Thumbnail upload стили */
.thumbnail-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.thumbnail-preview {
    width: 100%;
    height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.thumbnail-preview:hover {
    border-color: #4caf50;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.thumbnail-preview i {
    font-size: 48px;
    color: #888888;
    margin-bottom: 10px;
}

.thumbnail-preview span {
    color: #888888;
    font-size: 14px;
    text-align: center;
}

.thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.select-thumbnail-btn {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.select-thumbnail-btn:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}

/* Image upload стили для рекомендаций */
.image-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-preview {
    width: 100%;
    height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.image-preview:hover {
    border-color: #4caf50;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.image-preview i {
    font-size: 48px;
    color: #888888;
    margin-bottom: 10px;
}

.image-preview span {
    color: #888888;
    font-size: 14px;
    text-align: center;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.select-image-btn {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.select-image-btn:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Действия форм */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.cancel-btn {
    background: linear-gradient(135deg, #666666, #555555);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #555555, #444444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.3);
}

/* Список контента */
.content-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.content-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.content-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.content-item h4 {
    font-size: 14px;
    margin-bottom: 6px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-item p {
    color: #cccccc;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #888888;
    flex-wrap: wrap;
    gap: 5px;
}

.content-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cccccc;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.action-btn.delete:hover {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #ffffff;
}

.action-btn.edit:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #ffffff;
}

/* Уведомления */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
}

.notification.error {
    background: linear-gradient(135deg, #ff4444, #cc0000);
}

.notification.warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.notification i {
    font-size: 16px;
}

/* Состояние пустого списка */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888888;
    font-size: 16px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .admin-container {
        padding: 15px;
    }
    
    .admin-nav {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .nav-btn {
        width: auto;
        min-width: 120px;
        padding: 12px 15px;
        font-size: 14px;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }
    
    .content-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .content-actions {
        position: static;
        margin-top: 15px;
        justify-content: flex-end;
    }
    
    .notification {
        min-width: 280px;
        right: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .admin-header h1 {
        font-size: 24px;
    }
    
    .add-form {
        padding: 20px;
    }
    
    .content-item {
        padding: 15px;
    }
    
    .notification {
        min-width: 250px;
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #333333, #444444);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #444444, #555555);
} 

/* Profile Links Section */
.profile-links-form {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.profile-links-form h3 {
    color: #4caf50;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.current-links {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.current-links h3 {
    color: #4caf50;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.links-display {
    display: grid;
    gap: 15px;
}

.link-item {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-item .link-info {
    flex: 1;
}

.link-item .link-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 5px;
}

.link-item .link-url {
    color: #4caf50;
    font-size: 14px;
    word-break: break-all;
}

.link-item .link-status {
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.link-item .link-status.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.link-item .link-status.inactive {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
} 