* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Serif SC', serif;
    background: #F5EFE6;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    /* 宣纸纹理 */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* --- 头部横幅 --- */
.header-banner {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    background: #F5EFE6;
}

.header-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- 手机端页面 --- */
.mobile-page {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #F5EFE6;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

.content-area {
    flex: 1;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    width: 100%;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.card-box h1 {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    color: #A62121;
    letter-spacing: 2px;
}

.card-box .subtitle {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* --- 输入框（带左侧图标） --- */
.input-group {
    position: relative;
    margin-bottom: 14px;
}

.input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.input-group .input-icon svg {
    width: 20px;
    height: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e0d8cc;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}

.input-group input::placeholder {
    color: #b8b0a4;
}

.input-group input:focus {
    border-color: #A62121;
}

/* --- 普通表单项 --- */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4A4A4A;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0d8cc;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b8b0a4;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #A62121;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* --- 复选框 --- */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px 0;
    font-size: 13px;
    color: #666;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #A62121;
    margin: 0;
}

/* --- 按钮 --- */
.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 1px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #A62121;
    color: #fff;
}

.btn-primary:hover {
    background: #8B0000;
}

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

.gift-reminder {
    color: #A62121;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.gift-reminder strong {
    font-weight: 700;
}

.error-msg {
    color: #A62121;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
    text-align: center;
}

/* --- 礼品选择 --- */
.gifts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.gift-card {
    border: 2px solid #e0d8cc;
    border-radius: 10px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    text-align: center;
}

.gift-card:hover {
    border-color: #A62121;
}

.gift-card.selected {
    border-color: #A62121;
    background: #fdf6f0;
    box-shadow: 0 0 0 1px #A62121;
}

.gift-card .gift-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.gift-card .gift-price {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.gift-card img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f5f0;
    margin-bottom: 14px;
}

.gift-card .gift-items {
    text-align: left;
    border-top: 1px solid #f0ece4;
    padding-top: 12px;
}

.gift-card .gift-item {
    font-size: 13px;
    color: #4A4A4A;
    line-height: 1.8;
    padding-left: 12px;
    position: relative;
}

.gift-card .gift-item::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #A62121;
    font-weight: 700;
}

/* --- 成功页 --- */
.success-page .card-box {
    text-align: center;
    padding: 60px 28px;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: #A62121;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(166, 33, 33, 0.25);
}

.success-icon::after {
    content: '✓';
    color: #fff;
    font-size: 36px;
    font-weight: 700;
}

.success-page h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #A62121;
}

.success-page p {
    color: #888;
    font-size: 14px;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px 28px;
    background: #A62121;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.back-home-btn:hover {
    background: #8B0000;
}

.back-home-btn svg {
    width: 18px;
    height: 18px;
}

/* --- 底部色块 --- */
.footer-block {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.footer-upper {
    background: #A67C52;
    height: 32px;
}

.footer-lower {
    background: #8C6239;
    height: 24px;
}

/* --- 管理端 --- */
.admin-page {
    min-height: 100vh;
    background: #F5EFE6;
}

.admin-banner {
    position: relative;
    width: 100%;
    background: #F5EFE6;
}

.admin-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.admin-banner .banner-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.admin-banner .banner-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: #A62121;
    letter-spacing: 4px;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}

.admin-banner .banner-title span {
    font-size: 14px;
    color: #A62121;
    letter-spacing: 2px;
    opacity: 0.8;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.admin-login {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}

.admin-login h1 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 22px;
    font-weight: 700;
    color: #A62121;
    letter-spacing: 2px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-header h1 {
    font-size: 20px;
    color: #4A4A4A;
}

.admin-header a {
    color: #4A4A4A;
    text-decoration: none;
    font-size: 14px;
}

.admin-header a:hover {
    color: #A62121;
}

/* --- 订单表格 --- */
.order-table {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.order-table table {
    width: 100%;
    border-collapse: collapse;
}

.order-table th,
.order-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0ece4;
    font-size: 14px;
}

.order-table th {
    background: #faf6f0;
    font-weight: 600;
    color: #4A4A4A;
}

.order-table tr:hover {
    background: #fdf9f4;
}

.order-table a {
    color: #A62121;
    text-decoration: none;
    font-weight: 500;
}

/* --- 分页 --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid #e0d8cc;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #4A4A4A;
    background: #fff;
}

.pagination a:hover {
    background: #faf6f0;
}

.pagination .current {
    background: #A62121;
    color: #fff;
    border-color: #A62121;
}

/* --- 订单详情 --- */
.detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,0.04);
}

.detail-card h2 {
    font-size: 18px;
    margin-bottom: 24px;
    font-weight: 700;
    color: #A62121;
    letter-spacing: 1px;
}

.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0ece4;
    font-size: 14px;
}

.detail-row .label {
    width: 100px;
    color: #888;
    flex-shrink: 0;
}

.detail-row .value {
    flex: 1;
    color: #333;
}

.courier-form {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0ece4;
}

.courier-form h3 {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #333;
}

.courier-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0d8cc;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 16px;
    background: #fff;
    outline: none;
    color: #333;
}

.courier-form select:focus {
    border-color: #A62121;
}

.courier-form .btn {
    width: auto;
    padding: 12px 32px;
    display: inline-block;
}

.flash-msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.flash-msg.success {
    background: #f0faf4;
    color: #2d8a4e;
    border: 1px solid #a8e6c1;
}

.flash-msg.error {
    background: #fdf0f0;
    color: #A62121;
    border: 1px solid #e8b8b8;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: #fff;
}

.gift-label {
    display: inline-block;
    padding: 3px 10px;
    background: #fdf6f0;
    color: #A62121;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

/* --- 订单查询结果 --- */
.query-result {
    background: #faf6f0;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e8ddd0;
}

.query-result .result-title {
    font-size: 15px;
    font-weight: 600;
    color: #A62121;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8ddd0;
}

.query-result .result-row {
    display: flex;
    padding: 8px 0;
    font-size: 14px;
}

.query-result .result-label {
    width: 80px;
    color: #888;
    flex-shrink: 0;
}

.query-result .result-value {
    flex: 1;
    color: #333;
}
