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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    padding: 2rem 0;
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.hero-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loading {
    opacity: 1;
}

.btn-text, .btn-loading {
    transition: opacity 0.3s ease;
}

.btn-loading {
    position: absolute;
    opacity: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

.auth-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.auth-card h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

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

.form-group input.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-group input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.auth-links p {
    margin-bottom: 0.5rem;
    color: #666;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

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

.auth-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.auth-info h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.auth-info ul {
    list-style: none;
    margin-bottom: 2rem;
}

.auth-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

.auth-info li:before {
    content: "✓";
    color: #28a745;
    margin-right: 0.5rem;
    font-weight: bold;
}

.api-info {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid #ffc107;
}

.api-info h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.api-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.api-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.api-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.api-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.api-key {
    background: #333;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    font-family: monospace;
    flex: 1;
    word-break: break-all;
}

.api-warning {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 3px;
    border-left: 4px solid #ffc107;
}


.orders-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

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

.status-待支付 {
    color: #ffc107;
    font-weight: 500;
}

.status-已支付 {
    color: #28a745;
    font-weight: 500;
}

.status-已过期 {
    color: #6c757d;
    font-weight: 500;
}

.status-失败 {
    color: #dc3545;
    font-weight: 500;
}

.no-orders {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.password-strength {
    margin-top: 0.5rem;
    display: none;
}

.password-strength.visible {
    display: block;
}

.strength-bar {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin-bottom: 0.25rem;
    overflow: hidden;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #dc3545;
    transition: all 0.3s ease;
}

.strength-bar.weak::before {
    width: 33%;
    background: #dc3545;
}

.strength-bar.medium::before {
    width: 66%;
    background: #ffc107;
}

.strength-bar.strong::before {
    width: 100%;
    background: #28a745;
}

.strength-text {
    font-size: 0.8rem;
    color: #666;
}

.password-requirements {
    margin-top: 0.5rem;
    display: none;
}

.password-requirements.visible {
    display: block;
}

.requirement {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.requirement.valid {
    color: #28a745;
}

.requirement.invalid {
    color: #dc3545;
}

.password-match {
    margin-top: 0.5rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.password-match.visible {
    display: flex;
}

.password-match.matching {
    color: #28a745;
}

.password-match.not-matching {
    color: #dc3545;
}

.match-icon {
    font-size: 0.9rem;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 35px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    color: #666;
}

.form-group input {
    padding-right: 40px;
}

.footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #007bff;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
}

.toast.show {
    animation: toastSlideIn 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-content {
    padding: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.toast-message {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-line;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f5f5f5;
    color: #333;
}

.toast-success {
    border-left-color: #28a745;
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-warning {
    border-left-color: #ffc107;
}

.toast-info {
    border-left-color: #17a2b8;
}

.toast.hide {
    animation: toastSlideOut 0.3s ease forwards;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.copy-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #0056b3;
}

.copy-btn.copied {
    background: #28a745;
}

.copy-btn.copied:hover {
    background: #218838;
}

@media (max-width: 768px) {
    .auth-form-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .api-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .api-key {
        width: 100%;
    }
    
    .toast {
        min-width: 280px;
        max-width: calc(100vw - 40px);
        right: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .api-section, .orders-section {
        padding: 1.5rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}
