/*
 * 友粮官网 - 购销竞价公开平台样式
 * 优化版本 - 增强视觉效果
 */

/* 平台页面布局 */
.platform-page {
    padding-top: 80px;
    min-height: 100vh;
    background-color: var(--brand-cream);
}

/* 页面横幅 - 增强版 */
.platform-banner {
    background: linear-gradient(135deg, var(--brand-green) 0%, #1a3d17 50%, var(--brand-green) 100%);
    padding: 4rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.platform-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.platform-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.platform-banner-content {
    position: relative;
    z-index: 10;
}

.platform-banner h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.platform-banner p {
    opacity: 0.9;
    font-size: 1.125rem;
    letter-spacing: 0.1em;
}

/* 分类导航标签 - 增强版 */
.platform-tabs {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 40;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.platform-tabs-container {
    display: flex;
    gap: 0;
}

.platform-tab {
    padding: 1.25rem 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}

.platform-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-gold), var(--brand-green));
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
}

.platform-tab:hover {
    color: var(--brand-gold);
    background-color: var(--brand-warm);
}

.platform-tab:hover::before {
    width: 60%;
}

.platform-tab.active {
    color: var(--brand-gold);
    background-color: var(--brand-warm);
}

.platform-tab.active::before {
    width: 100%;
}

/* 筛选区域 - 增强版 */
.platform-filter {
    background-color: white;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
    font-size: 0.875rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-option {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background-color: var(--brand-cream);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.filter-option:hover {
    color: var(--brand-gold);
    border-color: var(--brand-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.filter-option.active {
    background: linear-gradient(135deg, var(--brand-gold), #b8962e);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* 搜索框 */
.filter-search {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.filter-search input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    width: 240px;
    transition: border-color 0.3s ease;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--brand-gold);
}

.filter-search button {
    padding: 0.5rem 1rem;
    background-color: var(--brand-gold);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-search button:hover {
    background-color: var(--brand-green);
}

/* 列表区域 - 增强版 */
.platform-content {
    padding: 2.5rem 0 5rem;
}

.platform-list {
    background-color: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* 列表头部 */
.list-header {
    display: none;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--brand-cream) 0%, #f5f0e6 100%);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .list-header {
        display: grid;
        grid-template-columns: 1fr 120px 120px 100px;
        gap: 1rem;
        align-items: center;
    }
}

/* 列表项 - 增强版 */
.list-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
}

.list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--brand-gold), var(--brand-green));
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background-color: var(--brand-warm);
    padding-left: 2rem;
}

.list-item:hover::before {
    transform: scaleY(1);
}

@media (min-width: 768px) {
    .list-item {
        display: grid;
        grid-template-columns: 1fr 120px 120px 100px;
        gap: 1rem;
        align-items: center;
    }
}

/* 列表项内容 */
.list-item-main {
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .list-item-main {
        margin-bottom: 0;
    }
}

.list-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item:hover .list-item-title {
    color: var(--brand-gold);
}

.list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .list-item-meta {
        display: none;
    }
}

.list-item-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    background-color: var(--brand-cream);
    color: var(--text-secondary);
}

.list-item-category.bid {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--brand-gold);
}

.list-item-category.result {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.list-item-date,
.list-item-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: none;
}

@media (min-width: 768px) {
    .list-item-date,
    .list-item-status {
        display: block;
    }
}

/* 状态标签 - 增强版 */
.status-tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.status-tag.ongoing {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-tag.ended {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(107, 114, 128, 0.05));
    color: var(--text-muted);
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.status-tag.awarded {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    color: var(--color-success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* 分页 - 增强版 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem 0;
}

.pagination-btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-secondary);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--brand-gold), #b8962e);
    border-color: var(--brand-gold);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 1rem;
}

/* 空状态 */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1rem;
}

/* 详情弹窗 - 增强版 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--brand-cream) 0%, white 100%);
}

.modal-header h3 {
    font-size: 1.375rem;
    font-weight: bold;
    color: var(--text-primary);
    padding-right: 2rem;
    line-height: 1.4;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--brand-gold);
    background-color: var(--brand-warm);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-info-item {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--brand-cream) 0%, #f8f5ef 100%);
    border-radius: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.modal-info-item:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.modal-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-info-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.modal-description {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--brand-cream) 0%, #f8f5ef 100%);
    border-radius: 1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: linear-gradient(135deg, #fafafa 0%, white 100%);
}

.modal-footer .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-footer .btn:hover {
    transform: translateY(-2px);
}

/* 滚动条美化 */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--brand-cream);
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--brand-gold), var(--brand-green));
    border-radius: 3px;
}
