/* 基础样式重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 顶部导航栏 */
.top-bar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.top-title h1 {
    font-size: 18px;
    font-weight: 600;
}

.top-icons i {
    font-size: 20px;
    margin-left: 15px;
    cursor: pointer;
}

/* 主要内容区域 */
.page-content {
    margin-top: 80px;
    padding: 20px;
}

/* 卡片样式 */
.profile-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* 表单区域 */
.form-section {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
    font-size: 16px;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 14px;
    box-sizing: border-box;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #fff;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 25px;
}

.upload-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.image-upload-container {
    position: relative;
    text-align: center;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.upload-label:hover {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.upload-label i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.upload-label span {
    font-size: 16px;
    color: #666;
}

.preview-img {
    max-width: 100%;
    margin-top: 20px;
    display: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 日期范围 */
.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range input[type="date"] {
    flex: 1;
}

.date-separator {
    font-weight: 500;
    color: #666;
}

/* 地址选择器 */
.address-selectors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.address-selectors select {
    margin: 0;
    padding: 10px;
    font-size: 14px;
}

.address-group {
    margin-bottom: 15px;
}

#addressInput {
    padding: 10px;
    font-size: 14px;
}

/* 输入组 */
.input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.input-group input[type="number"] {
    flex: 1;
    margin-right: 10px;
}

/* 红包按钮 */
.inline-redpacket {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.inline-redpacket:hover {
    transform: scale(1.1);
}

.inline-redpacket i {
    color: white;
    font-size: 18px;
}

.inline-redpacket .tooltip {
    visibility: hidden;
    width: 120px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 999;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.inline-redpacket:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.inline-redpacket .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background-color: red;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    text-align: center;
    line-height: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 标签区域 */
.tag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.toggle-button {
    background: none;
    border: none;
    color: #667eea;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.toggle-button:hover {
    background-color: #f0f0f0;
}

.tag-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* 标签容器折叠状态 */
.tag-container.collapsed {
    display: none;
}

.tag-checkbox {
    display: none;
}

.tag-checkbox-label {
    display: block;
    padding: 12px 10px;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.tag-checkbox:checked + .tag-checkbox-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.tag-checkbox-label:hover {
    background-color: #e9ecef;
}

.tag-checkbox:checked + .tag-checkbox-label:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 信息提示 */
.info-text {
    margin-top: 10px;
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: flex-start;
}

.info-text i {
    margin-right: 8px;
    margin-top: 3px;
    color: #667eea;
}

/* 注意事项 */
.note {
    background-color: #fff9db;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.note h4 {
    margin-bottom: 10px;
    color: #856404;
}

.note p {
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

/* 按钮样式 */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn i {
    margin-right: 8px;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.secondary-btn:hover {
    background: #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-content {
        padding: 15px;
    }

    .profile-card {
        padding: 20px;
    }

    .address-selectors {
        grid-template-columns: repeat(1, 1fr);
    }

    .date-range {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .date-separator {
        text-align: center;
    }

    .tag-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group input[type="number"] {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0 15px;
    }

    .tag-container {
        grid-template-columns: 1fr;
    }

    .upload-label {
        padding: 20px;
    }

    .upload-label i {
        font-size: 24px;
    }
}
