/* StoryFab X - Projects Page Cinema Director Styles */
/* 电影导演工作室风格 - 项目列表页 */

@import (reference) '../../styles/mixins.less';
@import (reference) '../../styles/variables.less';

@bg-primary: #0d0d0f;

@radius-xl: 16px;

.container {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 页面头部 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;

  h2 {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: 28px;
    color: @text-primary;
    margin: 0;
  }

  :global {
    .ant-btn-primary {
      .amber-btn-primary();
      color: @ink-black !important;
      font-family: var(--font-display, 'Outfit', sans-serif);
      font-weight: 500;
      box-shadow: @shadow-glow-amber;

      &:hover {
        filter: brightness(1.1);
        transform: translateY(-1px);
      }
    }
  }
}

/* 筛选器 */
.filterBar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;

  :global {
    .ant-select {
      .ant-select-selector {
        .input-base();
      }
    }

    .ant-input-affix-wrapper {
      .input-affix-wrapper-base();
    }
  }
}

/* 项目卡片 */
.projectCard {
  margin-bottom: 20px;
  border-radius: @radius-lg;
  overflow: hidden;
  background: @bg-card;
  border: 1px solid @border-subtle;
  .glass-base();
  .transition-bounce();

  &:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 165, 116, 0.3);
    box-shadow: @shadow-glow-amber, 0 8px 32px rgba(0, 0, 0, 0.3);

    .cardCover {
      .coverOverlay {
        opacity: 1;
      }
    }
  }

  :global {
    .ant-card-body {
      padding: 16px;
    }
  }
}

/* 封面区域 */
.cardCover {
  position: relative;
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, @bg-surface 0%, @ink-charcoal 100%);
  overflow: hidden;

  /* 网格背景 */
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
      linear-gradient(rgba(212, 165, 116, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(212, 165, 116, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
  }

  .cardIcon {
    font-size: 48px;
    color: @text-muted;
    opacity: 0.5;
    transition: all 0.3s ease;
  }

  .coverOverlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(13, 13, 15, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;

    .anticon {
      font-size: 32px;
      color: @film-amber;
    }
  }
}

/* 卡片信息 */
.cardInfo {
  margin-bottom: 12px;

  :global {
    .ant-typography-title {
      font-family: var(--font-display, 'Outfit', sans-serif);
      font-weight: 600;
      color: @text-primary !important;
    }
  }

  .projectTitle {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 600;
    font-size: 16px;
    color: @text-primary;
    margin-bottom: 4px;
  }

  .projectDesc {
    font-size: 13px;
    color: @text-muted;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* 项目元信息 */
.projectMeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;

  .metaItem {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: @text-muted;

    .anticon {
      font-size: 14px;
    }
  }
}

/* 状态标签 */
:global {
  .ant-tag {
    border-radius: 4px;
    font-size: 11px;
    padding: 2px 8px;
  }

  .ant-tag-blue {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: #06b6d4;
  }

  .ant-tag-green {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
  }

  .ant-tag-orange {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
  }

  .ant-tag-default {
    background: rgba(255, 255, 255, 0.05);
    border-color: @border-default;
    color: @text-secondary;
  }
}

/* 操作按钮 */
.cardActions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid @border-subtle;

  :global {
    .ant-btn {
      color: @text-muted;
      background: transparent;
      border: none;

      &:hover {
        color: @film-amber;
        background: rgba(212, 165, 116, 0.1);
      }
    }
  }
}

/* 空状态 */
.emptyState {
  padding: 80px 24px;
  text-align: center;

  .emptyIcon {
    font-size: 64px;
    color: @text-dim;
    margin-bottom: 24px;
    opacity: 0.5;
  }

  .emptyTitle {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 20px;
    font-weight: 600;
    color: @text-primary;
    margin-bottom: 8px;
  }

  .emptyDesc {
    font-size: 14px;
    color: @text-muted;
    margin-bottom: 24px;
  }
}

/* 分页 */
:global {
  .ant-pagination {
    .ant-pagination-item {
      background: @bg-surface;
      border-color: @border-default;

      a {
        color: @text-secondary;
      }

      &:hover {
        border-color: @film-amber;

        a {
          color: @film-amber;
        }
      }
    }

    .ant-pagination-item-active {
      background: rgba(212, 165, 116, 0.15);
      border-color: @film-amber;

      a {
        color: @film-amber;
      }
    }

    .ant-pagination-prev,
    .ant-pagination-next {
      .ant-pagination-item-link {
        background: @bg-surface;
        border-color: @border-default;
        color: @text-secondary;

        &:hover {
          border-color: @film-amber;
          color: @film-amber;
        }
      }
    }
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .filterBar {
    width: 100%;
  }

  .cardCover {
    height: 120px;
  }
}
