* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.login-button,
.submit-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-button:hover,
.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* 管理员后台样式 */
.admin-container {
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 货币选择器样式 */
.currency-selector-wrapper {
    position: relative;
    display: inline-block;
}

.currency-selector {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 35px 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 110px;
}

.currency-selector:hover {
    background: rgba(255, 255, 255, 0.3);
}

.currency-selector:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.currency-selector option {
    background: #667eea;
    color: white;
    padding: 8px;
}

.currency-selector-wrapper::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: white;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 1;
    opacity: 0.9;
}

.currency-selector-wrapper:hover::after {
    opacity: 1;
}

.currency-selector-wrapper:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.admin-nav {
    background: white;
    padding: 0 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0;
}

.nav-link {
    display: inline-block;
    padding: 20px 30px;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #667eea;
    background: #f8f9ff;
}

.nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.admin-main {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
}

.stat-card.pending .stat-number {
    color: #ffc107;
}

.stat-card.paid .stat-number {
    color: #28a745;
}

.stat-card.failed .stat-number {
    color: #dc3545;
}

.orders-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.orders-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table thead {
    background: #f8f9fa;
}

.orders-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

.orders-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.orders-table tbody tr:hover {
    background: #f8f9ff;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.view-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.view-link:hover {
    text-decoration: underline;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

.create-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

.create-section h2 {
    margin-bottom: 30px;
    color: #333;
}

.create-section h3 {
    margin: 30px 0 20px 0;
    color: #666;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.create-form {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .admin-nav {
        flex-direction: column;
        padding: 0;
    }

    .nav-link {
        border-bottom: 1px solid #f0f0f0;
        border-left: 3px solid transparent;
    }

    .nav-link.active {
        border-left-color: #667eea;
        border-bottom-color: #f0f0f0;
    }

    .admin-main {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .orders-table {
        font-size: 14px;
    }

    .orders-table th,
    .orders-table td {
        padding: 10px 8px;
    }
}

