/* 添加成果页面样式 */

/* 页面头部 */
.add-header {
    background: linear-gradient(135deg, #5B9BD5 0%, #7FB3E6 50%, #9CC8F0 100%);
    padding: 30px 24px 40px;
    position: relative;
    overflow: hidden;
    text-align: center; /* 让文字居中 */
}

.add-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.page-title {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    display: inline-block; /* 配合 text-align: center */
}

.page-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    position: relative;
    z-index: 1;
    display: block; /* 占满一行 */
}

/* 成果类型选择 */
.type-section {
    padding: 16px;
    margin-top: -20px;
    position: relative;
    z-index: 2;
}

.type-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
}

.type-tabs::-webkit-scrollbar {
    display: none;
}

.type-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 60px;
}

.type-tab svg {
    width: 24px;
    height: 24px;
    color: #8E8E93;
    transition: color 0.3s ease;
}

.type-tab span {
    font-size: 12px;
    color: #8E8E93;
    font-weight: 500;
    transition: color 0.3s ease;
}

.type-tab.active {
    background: linear-gradient(135deg, #5B9BD5 0%, #7FB3E6 100%);
}

.type-tab.active svg,
.type-tab.active span {
    color: #fff;
}

.type-tab:active {
    transform: scale(0.95);
}

/* 表单区域 */
.form-section {
    padding: 20px 16px 120px;
    min-height: calc(100vh - 200px);
}

.achievement-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.achievement-form.active {
    display: block;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1C1C1E;
    margin-bottom: 10px;
}

/* 自定义下拉选择器 */
.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #F8F9FA;
    border: 2px solid #E5E5EA;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 50px;
    box-sizing: border-box;
}

.select-trigger:hover {
    background: #F0F1F2;
    border-color: #5B9BD5;
}

.custom-select.open .select-trigger {
    background: #fff;
    border-color: #5B9BD5;
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.15);
    border-radius: 12px 12px 0 0;
}

.select-text {
    font-size: 15px;
    color: #C7C7CC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select-text.selected {
    color: #1C1C1E;
}

.select-arrow {
    width: 20px;
    height: 20px;
    color: #5B9BD5;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #5B9BD5;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-select.open .select-options {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.select-option {
    padding: 14px 16px;
    font-size: 15px;
    color: #1C1C1E;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #F2F2F7;
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: linear-gradient(135deg, rgba(91, 155, 213, 0.1) 0%, rgba(127, 179, 230, 0.1) 100%);
    color: #5B9BD5;
}

.select-option.active {
    background: linear-gradient(135deg, #5B9BD5 0%, #7FB3E6 100%);
    color: #fff;
}

/* 普通输入框样式 */
.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #1C1C1E;
    background: #F8F9FA;
    border: 2px solid #E5E5EA;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 50px;
}

.form-group input::placeholder {
    color: #C7C7CC;
}

.form-group input:focus {
    background: #fff;
    border-color: #5B9BD5;
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.15);
}

/* 文本域样式 */
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #1C1C1E;
    background: #F8F9FA;
    border: 2px solid #E5E5EA;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-group textarea::placeholder {
    color: #C7C7CC;
}

.form-group textarea:focus {
    background: #fff;
    border-color: #5B9BD5;
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.15);
}

/* 排名表单双列布局 */
.form-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.form-group.half {
    flex: 1;
    margin-bottom: 20px;
}

.form-divider {
    font-size: 20px;
    font-weight: 600;
    color: #8E8E93;
    margin-bottom: 24px;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #5B9BD5 0%, #7FB3E6 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    letter-spacing: 1px;
}

.submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.4);
}

.submit-btn:hover {
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.3);
}

/* 自定义日期选择器 */
.custom-date-picker {
    position: relative;
    width: 100%;
}

.date-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #F8F9FA;
    border: 2px solid #E5E5EA;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 50px;
    box-sizing: border-box;
}

.date-trigger:hover {
    background: #F0F1F2;
    border-color: #5B9BD5;
}

.custom-date-picker.open .date-trigger {
    background: #fff;
    border-color: #5B9BD5;
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.15);
}

.date-text {
    font-size: 15px;
    color: #C7C7CC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-text.selected {
    color: #1C1C1E;
}

.date-icon {
    width: 22px;
    height: 22px;
    color: #5B9BD5;
    flex-shrink: 0;
}

/* 日期选择器弹窗 */
.date-picker-popup {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 100px;
    background: #fff;
    border: 2px solid #5B9BD5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    padding: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.custom-date-picker.open .date-picker-popup {
    display: block;
    animation: fadeInUp 0.2s ease;
}

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

/* 日期选择器头部 */
.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.date-nav {
    background: none;
    border: none;
    font-size: 18px;
    color: #5B9BD5;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.date-nav:hover {
    background: rgba(91, 155, 213, 0.1);
}

.date-current {
    font-size: 16px;
    font-weight: 600;
    color: #1C1C1E;
}

/* 星期标题 */
.date-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.date-picker-weekdays span {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #8E8E93;
    padding: 8px 0;
}

/* 日期网格 */
.date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.date-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #1C1C1E;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.date-day:hover {
    background: rgba(91, 155, 213, 0.1);
    color: #5B9BD5;
}

.date-day.today {
    background: rgba(91, 155, 213, 0.15);
    color: #5B9BD5;
    font-weight: 600;
}

.date-day.selected {
    background: linear-gradient(135deg, #5B9BD5 0%, #7FB3E6 100%);
    color: #fff;
}

.date-day.other-month {
    color: #C7C7CC;
}

.date-day:disabled {
    color: #E5E5EA;
    cursor: not-allowed;
}

/* 日期选择器底部 */
.date-picker-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #F2F2F7;
}

.date-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #5B9BD5;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.date-btn:hover {
    background: rgba(91, 155, 213, 0.1);
}

/* 数字输入框样式 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* 响应式调整 */
@media screen and (max-width: 360px) {
    .type-tab {
        padding: 12px 14px;
        min-width: 50px;
    }
    
    .type-tab svg {
        width: 22px;
        height: 22px;
    }
    
    .type-tab span {
        font-size: 11px;
    }
    
    .date-picker-popup {
        padding: 12px;
    }
    
    .date-day {
        font-size: 13px;
    }
}
