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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0e27;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* 背景动画粒子效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(120, 219, 255, 0.15), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleMove {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%; }
    50% { background-position: 100% 0%, 0% 100%, 50% 50%; }
}

.container {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 100%;
    padding: 40px;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    z-index: 1;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 500;
}

.header-actions {
    margin-top: 20px;
}

.orders-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.orders-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.orders-btn:hover::before {
    width: 300px;
    height: 300px;
}

.orders-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.orders-btn:active {
    transform: translateY(0);
}

.logout-btn {
    padding: 12px 24px;
    background: rgba(108, 117, 125, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(108, 117, 125, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
    transform: translateY(-2px);
}

.debug-btn {
    padding: 12px 24px;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.debug-btn:hover {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.test-btn {
    padding: 12px 24px;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.test-btn:hover {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
    transform: translateY(-2px);
}

.delete-test-btn {
    padding: 12px 24px;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.delete-test-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
    transform: translateY(-2px);
}

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

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

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.2),
        0 0 20px rgba(102, 126, 234, 0.3);
}

.form-hint {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    margin-top: 8px;
}

.warning-box {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 12px;
    color: rgba(255, 193, 7, 0.9);
    font-size: 13px;
    line-height: 1.6;
    backdrop-filter: blur(10px);
}

.warning-box strong {
    color: #ffc107;
}

.md5-value {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-all;
    font-weight: 600;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 400px;
    height: 400px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.submit-btn:active {
    transform: translateY(-1px);
}

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

.qr-container {
    text-align: center;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.qr-header h2 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 700;
}

.qr-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 10px;
}

.qr-notice {
    color: rgba(102, 126, 234, 0.9) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-top: 15px !important;
    margin-bottom: 30px !important;
    padding: 12px 20px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: inline-block;
}

.qr-code-wrapper {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

#qrcode {
    display: inline-block;
}

#qrcode canvas {
    border-radius: 12px;
}

.qr-info {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

.back-btn {
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 订单列表样式 */
.orders-container {
    animation: fadeIn 0.6s ease-out;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.orders-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 800;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 10px;
    min-height: 400px;
}

.orders-list::-webkit-scrollbar {
    width: 6px;
}

.orders-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.orders-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

.orders-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.order-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible !important; /* 确保内容不被裁剪 */
    min-height: 200px; /* 确保有足够的高度显示内容 */
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.order-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.order-item:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.order-item:hover::before {
    opacity: 1;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.order-id {
    font-weight: 700;
    color: rgba(255, 255, 255, 1) !important;
    font-size: 16px !important;
    letter-spacing: 0.5px;
}

.order-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-paid {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.status-confirmed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-cancelling {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.status-cancelled {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.order-info {
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: auto !important; /* 自动高度，根据内容调整 */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
}

.info-row {
    display: block !important;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    margin-bottom: 8px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .info-label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 6px;
    display: block;
    width: 100%;
}

.info-row .info-value-full {
    color: rgba(255, 255, 255, 1) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    text-align: left !important;
    width: 100%;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6 !important;
    background: transparent !important;
    padding: 8px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    display: block;
    min-height: auto;
    box-sizing: border-box;
    border-left: 3px solid rgba(102, 126, 234, 0.5) !important;
    padding-left: 12px !important;
}

/* 兼容旧的info-value类 */
.info-row .info-value {
    color: rgba(255, 255, 255, 1) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    text-align: left !important;
    width: 100%;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6 !important;
    background: transparent !important;
    padding: 8px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    display: block;
    min-height: auto;
    box-sizing: border-box;
    border-left: 3px solid rgba(102, 126, 234, 0.5) !important;
    padding-left: 12px !important;
}

.order-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.confirm-btn, .cancel-btn, .delete-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.delete-btn {
    background: rgba(108, 117, 125, 0.3);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(108, 117, 125, 0.5);
    backdrop-filter: blur(10px);
    flex: 0 0 auto;
    min-width: 80px;
    margin-left: 10px;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
    color: #dc3545;
    transform: translateY(-2px);
}

.confirm-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.cancel-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.order-result {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.order-result.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.order-result.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.order-result.info {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.order-result.error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    font-weight: 700;
    animation: pulseError 2s ease-in-out infinite;
}

@keyframes pulseError {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }
}

.no-orders {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    .header h1 {
        font-size: 28px;
    }

    .qr-header h2 {
        font-size: 22px;
    }
    
    .orders-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-row .info-value {
        text-align: left;
    }
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-btn {
    padding: 12px 24px;
    background: rgba(102, 126, 234, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 100px;
}

.page-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.page-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    padding: 0 20px;
}
