/* 引入 Google Fonts 和 Font Awesome */
/* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css'); */




/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f1f3f5;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 100%;
    width: 100%;
    padding: 20px;
    margin: 0 auto;
}

/* 标题样式 */
h1, h2, h3 {
    color: #2c3e50;
    font-weight: 500;
}

h1 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 15px;
}

h3 {
    font-size: clamp(1rem, 3vw, 1.4rem);
    margin-bottom: 10px;
    font-weight: 700;
    color: #2c3e50;
}

/* Logo 样式 */
.logo {
    text-align: left;
    margin-bottom: 20px;
}

.logo img {
    max-width: 150px;
    height: auto;
    border-radius: 5px;
}

/* 版权信息 */
.copyright {
    text-align: center;
    margin-top: 30px;
    padding: 15px 0;
    border-top: 1px solid #ddd;
}

.copyright p {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #666;
}

/* 表单样式 */
form {
    margin-top: 20px;
}

.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #2c3e50;
    margin-bottom: 8px;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    background: #fff;
    color: #333;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: #3498db;
    outline: none;
}

textarea {
    height: 100px;
    resize: none;
}

/* 表单行 */
.form-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.form-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 300px;
}

.form-group label {
    white-space: nowrap;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #2c3e50;
}

.form-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    background: #fff;
    color: #333;
}

/* 数量选择器 */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-selector button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: background 0.3s ease;
}

.quantity-selector button:hover {
    background: #2980b9;
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    background: #fff;
    color: #333;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #333;
}

table th {
    background: #3498db;
    color: #fff;
    font-weight: 500;
}

table td {
    border-bottom: 1px solid #ddd;
}

table tr:last-child td {
    border-bottom: none;
}

/* 操作链接 */
.action-link {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s ease;
}

.action-link.edit {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.action-link.edit:hover {
    background: rgba(40, 167, 69, 0.2);
}

.action-link.delete {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.action-link.delete:hover {
    background: rgba(220, 53, 69, 0.2);
}

/* 提示框 */
.alert {
    background: #dc3545;
    color: #fff;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    text-align: center;
}

/* 导航链接 */
nav {
    margin-bottom: 20px;
}

nav a {
    margin-right: 15px;
    color: #3498db;
    text-decoration: none;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #2980b9;
}

/* 返回链接 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    text-decoration: none;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #2980b9;
}

/* Index 页面样式 */
.container form {
    max-width: 400px;
    margin: 0 auto;
}

.container form label {
    display: block;
    margin-bottom: 8px;
}

.container form input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    background: #fff;
    color: #333;
}

/* 去支付按钮 */
.pay-button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s ease, transform 0.2s ease;
    height: 48px;
    line-height: 48px;
    box-sizing: border-box;
}

.pay-button:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

/* 手机端优化 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .logo img {
        max-width: 120px;
    }

    h1 {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    h2 {
        font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group {
        width: 100%;
    }

    table th, table td {
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        padding: 10px;
    }

    .pay-button {
        font-size: clamp(0.85rem, 2vw, 0.9rem);
        padding: 12px 20px;
        height: 50px;
        line-height: 50px;
    }
}

/* 电脑端优化 */
@media (min-width: 768px) {
    .container {
        max-width: 900px;
    }
}