* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: #667eea;
    font-size: 28px;
    font-weight: 700;
}

.logo p {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px 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 10px 30px rgba(17, 153, 142, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.result-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.result-box h3 {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 10px;
}

.vipcode {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    letter-spacing: 2px;
    margin: 15px 0;
}

.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.nav-links {
    text-align: center;
    margin-top: 20px;
}

.nav-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* 管理员后台样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h3 {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 32px;
    font-weight: 700;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #667eea;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

table tr:hover {
    background: #f8f9fa;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    cursor: pointer;
    color: #667eea;
    font-weight: 500;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

.pagination a {
    background: #f0f0f0;
    color: #333;
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination .current {
    background: #667eea;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.logout-btn {
    background: #ff6b6b;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    background: #ff5252;
}
