/* 组件样式 */

/* 简单扇形导航 - 直接定位实现 */
.fan-menu {
    position: fixed;
    top: 50%;
    right: var(--spacing-xl);
    transform: translateY(-50%);
    z-index: 1000;
}

.fan-menu-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: 3px solid white;
    position: relative;
    z-index: 1002;
}

.fan-menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.fan-menu-toggle.active {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.fan-menu-items {
    position: absolute;
    bottom: 0;
    right: 0;
    pointer-events: none;
}

.fan-menu-item {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid white;
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    z-index: 1003;
}

.fan-menu-item svg {
    width: 24px;
    height: 24px;
}

.fan-menu-item:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 左侧扇形布局 - 增加距离 */
.fan-menu-item:nth-child(1) {
    bottom: 60px;
    right: 60px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.fan-menu-item:nth-child(2) {
    bottom: 0;
    right: 80px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.fan-menu.active .fan-menu-item {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.fan-menu.active .fan-menu-item:nth-child(1) {
    transition-delay: 0.1s;
}

.fan-menu.active .fan-menu-item:nth-child(2) {
    transition-delay: 0.2s;
}

.fan-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: none; /* disable mask */
}

.fan-menu.active .fan-menu-overlay {
    opacity: 0;
    visibility: hidden;
    display: none;
}

/* 简单工具提示 */
.fan-menu-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.fan-menu-item::before {
    content: '';
    position: absolute;
    left: 55px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.fan-menu-item:hover::after,
.fan-menu-item:hover::before {
    opacity: 1;
    visibility: visible;
}

/* 发布弹窗样式已移至 tender.css，保持统一 */

.modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04);
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.publish-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 40px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff6b35 100%);
    border-radius: 2px;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.close-btn i {
    font-size: 18px;
}

.modal-body {
    padding: 40px;
}

.publish-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.option-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b35 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 18px;
}

.option-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-color);
}

.option-item:hover::before {
    opacity: 0.05;
}

.option-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}


.option-icon-image {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.option-icon-video {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.option-item:hover .option-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.option-item svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.option-item span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.option-item:hover span {
    color: var(--primary-color);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-round);
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: var(--radius-small);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-small);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    border-radius: var(--radius-small);
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: var(--font-size-xs);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 返回顶部按钮样式（保证图标可见） */
.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

.scroll-to-top {
    color: #fff;
}

/* 徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background-color: var(--error-color);
    color: white;
    border-radius: var(--radius-round);
    font-size: var(--font-size-xs);
    font-weight: bold;
    line-height: 1;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

/* 分割线 */
.divider {
    height: 1px;
    background-color: var(--border-light);
    margin: var(--spacing-md) 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background-color: var(--border-light);
    margin: 0 var(--spacing-md);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .publish-btn {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }
    
    .modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }
    
    .publish-options {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    .option-item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 24px;
    }
    
    .option-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 0;
        margin-right: 16px;
    }
    
    .option-item svg {
        width: 20px;
        height: 20px;
    }
}

/* 扇形菜单响应式 */
@media (max-width: 768px) {
    .fan-menu {
        top: 50%;
        right: var(--spacing-md);
        transform: translateY(-50%);
    }
    
    .fan-menu-toggle {
        width: 55px;
        height: 55px;
        font-size: 18px;
    }
    
    .fan-menu-item {
        width: 52px;
        height: 52px;
        font-size: 16px;
    }
    
    .fan-menu-item svg {
        width: 22px;
        height: 22px;
    }
    
    .fan-menu-item:nth-child(1) {
        bottom: 55px;
        right: 55px;
    }
    
    .fan-menu-item:nth-child(2) {
        bottom: 0;
        right: 75px;
    }
    
    .fan-menu-item::after {
        left: 55px;
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .fan-menu-item::before {
        left: 50px;
    }
}

@media (max-width: 576px) {
    .fan-menu {
        top: 50%;
        right: var(--spacing-sm);
        transform: translateY(-50%);
    }
    
    .fan-menu-toggle {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .fan-menu-item {
        width: 48px;
        height: 48px;
        font-size: 14px;
    }
    
    .fan-menu-item svg {
        width: 20px;
        height: 20px;
    }
    
    .fan-menu-item:nth-child(1) {
        bottom: 50px;
        right: 50px;
    }
    
    .fan-menu-item:nth-child(2) {
        bottom: 0;
        right: 70px;
    }
    
    .fan-menu-item::after {
        left: 50px;
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .fan-menu-item::before {
        left: 45px;
    }
}

/* 发布图文弹窗样式 */
.publish-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding-top: calc(var(--header-height, 80px) + 20px);
    padding-bottom: 20px;
    overflow-y: auto;
}

.publish-image-modal.show {
    opacity: 1;
    visibility: visible;
}

.publish-image-modal .modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - var(--header-height, 80px) - 40px);
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin: auto;
}

.publish-image-modal.show .modal-content {
    transform: translateY(0);
}

.publish-image-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: none;
}

.publish-image-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.publish-image-modal .close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.publish-image-modal .close-btn:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.publish-image-modal .modal-body {
    padding: 24px;
}

/* 表单样式 */
.publish-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-light);
    position: relative; /* 确保可以绝对定位子元素 */
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.upload-placeholder i {
    font-size: 32px;
    color: var(--text-secondary);
}

.upload-placeholder span {
    font-size: 14px;
}

/* 已上传图片样式 */
.uploaded-cover {
    position: relative;
    display: inline-block;
    margin-top: 12px;
}

.uploaded-cover img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-light);
}

.remove-cover {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.remove-cover:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.uploaded-image-item {
    position: relative;
    display: inline-block;
}

.uploaded-image-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-light);
}

.uploaded-image-item .remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s ease;
}

.uploaded-image-item .remove-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* 按钮组样式 */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--border-light);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 发布图文弹窗响应式 */
@media (max-width: 768px) {
    .publish-image-modal .modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .uploaded-images {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .uploaded-image-item img {
        width: 80px;
        height: 80px;
    }
}
