* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

#app {
    min-height: 100vh;
}

[v-cloak] {
    display: none;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 28px;
}

.logo h1 {
    font-size: 22px;
    color: white;
    font-weight: 700;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

/* 主内容区域 */
.main-content {
    padding: 15px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

/* 查询卡片 */
.query-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 15px;
    overflow: hidden;
}

.query-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.query-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.query-form {
    margin-bottom: 15px;
}

.query-input-wrapper {
    display: flex;
    gap: 10px;
}

.query-input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.query-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.query-input::placeholder {
    color: #adb5bd;
}

.btn-query {
    padding: 11px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-query:active {
    transform: scale(0.98);
}

/* 查询结果 */
.query-results {
    margin-top: 15px;
}

.results-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.result-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.result-date {
    font-size: 12px;
    color: #999;
}

.result-amount {
    font-size: 16px;
    color: #667eea;
    font-weight: 700;
}

.result-room {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.result-students {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-student {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    font-size: 12px;
}

.student-name {
    color: #333;
    font-weight: 500;
}

.student-amount {
    color: #52c41a;
    font-weight: 600;
}

.btn-clear-query {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid #d9d9d9;
    color: #666;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-clear-query:active {
    background: #f5f5f5;
    transform: scale(0.98);
}

.no-result {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

/* 支付卡片 */
.payment-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    min-height: 200px;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px 30px;
    text-align: center;
}

.header-icon {
    font-size: 40px;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.header-desc {
    opacity: 0.9;
    font-size: 13px;
}

/* 表单区域 */
.payment-form {
    padding: 20px;
}

/* 通用部分样式 */
.room-section,
.parent-section,
.students-section {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.title-icon {
    font-size: 18px;
}

.student-count {
    margin-left: auto;
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
    background: #f0f4ff;
    padding: 3px 10px;
    border-radius: 12px;
}

/* 表单组 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    background: white;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #adb5bd;
}

.form-group input.readonly-input {
    background: #f8f9fa;
    color: #667eea;
    font-weight: 600;
    cursor: default;
}

/* 自习室选择 */
.room-select-wrapper {
    margin-bottom: 10px;
}

.room-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

.room-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* 学生列表 */
.student-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.student-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.student-item.student-error {
    border-color: #ff4d4f;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.student-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.student-number {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.btn-remove {
    width: 28px;
    height: 28px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-remove:active {
    transform: scale(0.95);
    background: #ff7875;
}

/* 添加学生按钮 */
.btn-add-student {
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px dashed #667eea;
    color: #667eea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-add-student:active {
    background: #667eea;
    color: white;
    transform: scale(0.98);
}

/* 费用汇总 */
.summary-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.summary-item .label {
    color: #666;
}

.summary-item .value {
    font-weight: 600;
    color: #333;
}

.summary-divider {
    height: 1px;
    background: #e9ecef;
    margin: 5px 0;
}

.summary-total {
    font-size: 15px;
    padding-top: 5px;
}

.total-amount {
    font-size: 20px;
    color: #667eea;
    font-weight: 700;
}

/* 提交区域 */
.submit-section {
    text-align: center;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.tip {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* 支付成功 */
.payment-success {
    padding: 40px 20px;
    text-align: center;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: bold;
    margin: 0 auto 20px;
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.payment-success h2 {
    font-size: 24px;
    color: #52c41a;
    margin-bottom: 8px;
}

.success-message {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
}

.payment-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
}

.payment-info .info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.payment-info .info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 13px;
}

.info-value {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.success-actions {
    display: flex;
    gap: 10px;
}

.btn-reset,
.btn-close {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset {
    background: #f0f4ff;
    color: #667eea;
}

.btn-reset:active {
    background: #e0e8ff;
    transform: scale(0.98);
}

.btn-close {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-close:active {
    transform: scale(0.98);
}

/* 金额输入 */
.amount-input {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input .currency {
    position: absolute;
    left: 14px;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
}

.amount-input .unit {
    position: absolute;
    right: 14px;
    color: #999;
    font-size: 12px;
}

.amount-input input {
    padding-left: 34px !important;
    padding-right: 38px !important;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .header {
        padding: 30px 40px;
    }

    .main-content {
        padding: 20px;
    }

    .payment-card {
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }

    .payment-form {
        padding: 30px;
    }

    .student-form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .student-form .form-group:nth-child(3),
    .student-form .form-group:nth-child(4) {
        grid-column: span 1;
    }

    .logo-icon {
        font-size: 32px;
    }

    .logo h1 {
        font-size: 26px;
    }
}

/* 适配小屏幕手机 */
@media (max-width: 375px) {
    .header {
        padding: 20px 15px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .main-content {
        padding: 12px;
    }

    .payment-form {
        padding: 15px;
    }

    .section-title {
        font-size: 14px;
    }

    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* 加载中遮罩 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-radius: 12px;
}

.loading-overlay p {
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
}

.loading-overlay .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f4ff;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin-loading 1s linear infinite;
}

@keyframes spin-loading {
    to {
        transform: rotate(360deg);
    }
}