/* StoryFab X - Project Edit Cinema Director Styles */
/* 电影导演工作室风格 - 项目编辑页 */

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

@bg-primary: #0d0d0f;

@radius-xl: 16px;

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  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: 24px;

  h3 {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: 24px;
    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);
      }
    }
  }
}

/* 自动保存状态 */
.autoSaveStatus {
  margin-bottom: 20px;
  padding: 10px 16px;
  background: @bg-surface;
  border-radius: @radius-md;
  border: 1px solid @border-subtle;
  display: flex;
  align-items: center;
  gap: 8px;

  .saveDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
  }

  .saveText {
    font-size: 13px;
    color: @text-muted;
  }
}

/* 卡片 */
.card {
  margin-bottom: 24px;
  border-radius: @radius-lg;
  background: @bg-card;
  border: 1px solid @border-subtle;
  backdrop-filter: blur(20px);
  overflow: hidden;

  :global {
    .ant-card-head {
      background: transparent;
      border-bottom: 1px solid @border-subtle;

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

    .ant-card-body {
      padding: 24px;
    }
  }
}

/* 步骤条 */
.stepsContainer {
  margin-bottom: 24px;
  padding: 24px;
  background: @bg-card;
  border-radius: @radius-lg;
  border: 1px solid @border-subtle;
  backdrop-filter: blur(20px);

  :global {
    .ant-steps {
      .ant-steps-item {
        .ant-steps-item-icon {
          background: @bg-surface;
          border-color: @border-default;

          .ant-steps-icon {
            color: @text-muted;
          }
        }

        &.ant-steps-item-process {
          .ant-steps-item-icon {
            background: linear-gradient(135deg, @film-amber 0%, #c49464 100%);
            border-color: @film-amber;

            .ant-steps-icon {
              color: @ink-black;
            }
          }

          .ant-steps-item-title {
            color: @film-amber !important;
            font-weight: 600;
          }
        }

        &.ant-steps-item-finish {
          .ant-steps-item-icon {
            background: rgba(212, 165, 116, 0.15);
            border-color: @film-amber;

            .ant-steps-icon {
              color: @film-amber;
            }
          }
        }

        .ant-steps-item-title {
          color: @text-secondary;
        }

        .ant-steps-item-description {
          color: @text-muted;
        }
      }
    }
  }
}

.stepsContent {
  margin-top: 24px;
}

/* 步骤卡片 */
.stepCard {
  border-radius: @radius-lg;
  background: @bg-card;
  border: 1px solid @border-subtle;
  backdrop-filter: blur(20px);

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

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

/* 表单样式 */
.formSection {
  margin-bottom: 24px;

  &:last-child {
    margin-bottom: 0;
  }

  .sectionTitle {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 600;
    font-size: 16px;
    color: @text-primary;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;

    .anticon {
      color: @film-amber;
    }
  }
}

:global {
  .ant-form-item {
    margin-bottom: 20px;

    .ant-form-item-label {
      padding-bottom: 8px;

      > label {
        color: @text-secondary;
        font-family: var(--font-body, 'DM Sans', sans-serif);
      }
    }
  }

  .ant-input,
  .ant-input-affix-wrapper,
  .ant-select-selector,
  .ant-picker {
    background: @bg-surface !important;
    border-color: @border-default !important;
    border-radius: @radius-md !important;
    color: @text-primary !important;

    &::placeholder {
      color: @text-muted !important;
    }

    &:hover {
      border-color: rgba(212, 165, 116, 0.5) !important;
    }

    &:focus,
    &-focused {
      border-color: @film-amber !important;
      box-shadow: 0 0 0 3px @film-amber-glow !important;
    }
  }

  .ant-radio-wrapper {
    color: @text-secondary;
  }

  .ant-radio-checked .ant-radio-inner {
    border-color: @film-amber !important;

    &::after {
      background: @film-amber;
    }
  }

  .ant-checkbox-checked .ant-checkbox-inner {
    background-color: @film-amber !important;
    border-color: @film-amber !important;
  }

  .ant-switch {
    background: @bg-surface;

    &-checked {
      background: @film-amber !important;
      box-shadow: @shadow-glow-amber;
    }
  }
}

/* 按钮组 */
.buttonGroup {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid @border-subtle;

  :global {
    .ant-btn {
      font-family: var(--font-display, 'Outfit', sans-serif);
      font-weight: 500;
      border-radius: @radius-md;
      height: 44px;
      padding: 0 32px;
      transition: all 0.2s ease;

      &.ant-btn-primary {
        background: linear-gradient(135deg, @film-amber 0%, #c49464 100%) !important;
        border: none !important;
        color: @ink-black !important;
        box-shadow: @shadow-glow-amber;

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

      &:not(.ant-btn-primary) {
        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;
  }

  .buttonGroup {
    flex-direction: column;

    :global .ant-btn {
      width: 100%;
    }
  }
}
