/* 
 * GOViral 管理后台 主要样式文件
 * 这个文件包含额外的样式定义，扩展基础样式
 */

/* 用户菜单下拉 */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 180px;
    z-index: 100;
    display: none;
    margin-top: 5px;
}

.user-menu.show {
    display: block;
}

.user-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.user-menu-item:hover {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
}

.user-menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--gray);
}

.divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 5px 0;
}

/* 侧边栏折叠样式 */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .menu-title {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
    font-size: 1.2rem;
}

.sidebar.collapsed .submenu {
    position: absolute;
    left: 60px;
    top: 0;
    width: 200px;
    background: white;
    border-radius: 0 4px 4px 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.main-content.expanded {
    margin-left: 60px;
}

/* 通知与消息下拉菜单 */
.notification-menu,
.message-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 300px;
    z-index: 100;
    display: none;
    margin-top: 5px;
}

.notification-menu.show,
.message-menu.show {
    display: block;
}

.notification-header,
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-title,
.message-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-list,
.message-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item,
.message-item {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.notification-item:hover,
.message-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.notification-item:last-child,
.message-item:last-child {
    border-bottom: none;
}

.notification-icon,
.message-icon {
    margin-right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.warning {
    background: var(--secondary);
}

.notification-icon.success {
    background: var(--success);
}

.notification-icon.danger {
    background: var(--danger);
}

.notification-content,
.message-content {
    flex: 1;
}

.notification-text,
.message-text {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.notification-time,
.message-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.notification-footer,
.message-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-footer a,
.message-footer a {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 页面加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 页面跳转淡入淡出效果 */
.fade-transition {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-transition.show {
    opacity: 1;
}

/* 通用卡片样式增强 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* 平台标识颜色 */
.platform-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.platform-icon.tiktok {
    background: #000000;
}

.platform-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.platform-icon.facebook {
    background: #1877f2;
}

.platform-icon.twitter {
    background: #1da1f2;
}

.platform-icon.youtube {
    background: #ff0000;
}

.platform-icon.linkedin {
    background: #0a66c2;
}

/* 特殊按钮样式 */
.btn-gradient {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        left: -100%;
        z-index: 1000;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
}

/* 主容器样式 */
.main-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #1e2034;
    color: #8a8b9f;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: #171727;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    height: 40px;
    width: 40px;
    margin-right: 10px;
}

.brand-text {
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
}

.sidebar-toggle {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #8a8b9f;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
}

.sidebar-menu {
    padding: 20px 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.menu-section {
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.menu-header {
    padding: 10px 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.menu-item {
    position: relative;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #8a8b9f;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-item a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.menu-item.active a {
    color: #fff;
    background-color: #3a3f51;
    border-left: 3px solid #4e73df;
}

.menu-item a i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-item a span {
    flex: 1;
}

/* 当侧边栏折叠时的样式 */
.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .menu-header,
.sidebar.collapsed .menu-item a span {
    display: none;
}

.sidebar.collapsed .menu-item a {
    justify-content: center;
    padding: 15px;
}

.sidebar.collapsed .menu-item a i {
    margin-right: 0;
    font-size: 1.3rem;
}

/* 内容区域样式 */
.content-wrapper {
    flex: 1;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .content-wrapper {
    margin-left: 70px;
}

/* 头部导航样式 */
.header {
    height: 70px;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    margin-left: 15px;
}

.search-input {
    background-color: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 5px;
    padding: 8px 15px 8px 40px;
    width: 300px;
    transition: all 0.3s ease;
}

.search-input:focus {
    background-color: #fff;
    border-color: #4e73df;
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b7b9cc;
}

.header-icon-group {
    display: flex;
    margin-right: 20px;
}

.header-icon {
    position: relative;
    font-size: 1.2rem;
    color: #5a5c69;
    margin-left: 15px;
    text-decoration: none;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74a3b;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #5a5c69;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid #e3e6f0;
}

.user-name {
    font-weight: 500;
    margin-right: 10px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    min-width: 200px;
    z-index: 99;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 12px 20px;
    background-color: #4e73df;
    color: #fff;
    font-weight: 600;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.dropdown-item {
    padding: 12px 20px;
    color: #5a5c69;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fc;
    color: #2e59d9;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #e3e6f0;
}

.notification-dropdown,
.message-dropdown {
    min-width: 300px;
}

/* 页面内容区域 */
.content-container {
    padding: 20px;
    height: calc(100vh - 70px);
}

#mainContent {
    width: 100%;
    height: 100%;
    border: none;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Toast通知样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    background-color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 15px;
}

.toast-icon {
    margin-right: 15px;
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-info .toast-icon {
    color: #4e73df;
}

.toast-success .toast-icon {
    color: #1cc88a;
}

.toast-warning .toast-icon {
    color: #f6c23e;
}

.toast-error .toast-icon {
    color: #e74a3b;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.toggled {
        transform: translateX(0);
    }
    
    .content-wrapper {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .search-input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .search-input {
        width: 150px;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 576px) {
    .search-container {
        display: none;
    }
} 