* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

.balance-info {
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: inline-block;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
}

.balance-value {
    font-size: 24px;
    font-weight: 700;
    margin: 0 5px;
    color: #ffd700;
}

.balance-unit {
    font-size: 14px;
    opacity: 0.9;
}

.form-section,
.price-section,
.order-section,
.order-list-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-section h2,
.price-section h2,
.order-section h2,
.order-list-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    margin-bottom: 12px;
}

.form-group input:last-child {
    margin-bottom: 0;
}

.size-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.size-inputs input,
.size-inputs select {
    flex: 1;
    margin-bottom: 0;
    min-width: 0; /* 允许flex子元素缩小 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 优化下拉框文字溢出 */
select {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
}

.price-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-item {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.price-item.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.price-item-left {
    flex: 1;
}

.price-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.price-item-time {
    font-size: 13px;
    color: #999;
}

.price-item-price {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.price-item-right {
    text-align: right;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item-left {
    flex: 1;
}

.order-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.order-item-info {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.order-item-right {
    text-align: right;
}

.order-item-price {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.order-item-status {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 51, 73, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.order-details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.order-detail-row:last-child {
    border-bottom: none;
}

.order-detail-label {
    color: #666;
}

.order-detail-value {
    color: #333;
    font-weight: 600;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.toast.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.toast.error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.hidden {
    display: none !important;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-text {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
    word-wrap: break-word;
}

.modal-close {
    margin-top: 0;
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    header h1 {
        font-size: 24px;
    }

    .form-section,
    .price-section,
    .order-section {
        padding: 18px;
    }

    .price-item-price {
        font-size: 20px;
    }

    /* 移动端弹窗优化 */
    .modal {
        padding: 15px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-text {
        font-size: 14px;
        margin-bottom: 18px;
    }
}