:root {
    --primary-color: #0071e3;
    --primary-hover: #0077ed;
    --success-text: #30d158;
    --error-text: #ff453a;
    --warning-text: #ff9f0a;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-light: #8e8e93;
    --border-color: #d2d2d7;
    --border-light: #e5e5ea;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fafafa;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
}

#page-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.grid-background {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    background-image: linear-gradient(to right, var(--border-light) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-light) 1px, transparent 1px);
    background-size: 30px 30px;
    -webkit-mask-image: radial-gradient(
        ellipse 70% 60% at 50% 0%,
        #000 60%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 70% 60% at 50% 0%,
        #000 60%,
        transparent 100%
    );
    pointer-events: none;
}

#sidebar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 0 24px;
    height: 60px;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 100;
}

.sidebar-nav svg {
    display: none;
}

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 150;
}

@media (max-width: 768px) {
    #sidebar-overlay {
        opacity: 0 !important;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
}

/* sidebar-overlay 移动端样式见 media query */
.sidebar-header {
    display: flex;
    align-items: center;
    position: absolute;
    left: 24px;
}

.sidebar-logo {
    display: block;
    width: 36px;
    height: 36px;
    background: url('../icon-Xtn-512x512.png') center/cover no-repeat;
    border-radius: 8px;
}

.user-info-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    position: absolute;
    right: 24px;
}

.user-info-panel .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-info-panel .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-nav {
}

.user-info-panel .username {
    display: none;
}

.user-info-panel .email {
    display: none;
}

.sidebar-auth-actions {
    display: flex;
    gap: 8px;
}

.btn-login, .btn-register {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-login {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-login:hover {
    background: var(--border-light);
}

.btn-register {
    background: var(--primary-color);
    color: white;
}

.btn-register:hover {
    background: var(--primary-hover);
}

.sidebar-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    gap: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary-color);
}

.sidebar-footer {
    display: flex;
    position: absolute;
    right: 24px;
}

.btn-logout {
    padding: 6px 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #edeef0;
    color: var(--text-primary);
}

#main-content {
    flex: 1;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    position: relative;
    z-index: 1;
}

.main-header {
    display: none;
    background: var(--bg-primary);
    padding: 12px 20px;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

#mobile-menu-btn:hover {
    background: var(--bg-tertiary);
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.user-profile:hover {
    background: var(--bg-tertiary);
}

.user-profile .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #0055cc);
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile .username {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 160px;
    border: 1px solid var(--border-light);
}

.user-profile:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
}

.top-header {
    background: var(--bg-primary);
    padding: 48px 32px;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.top-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.top-header h1 {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.top-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.search-container {
    display: inline-flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    max-width: 400px;
    width: 100%;
    transition: all 0.2s ease;
}

.search-container:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.search-container svg {
    color: var(--text-light);
}

.search-container input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    margin-left: 12px;
    outline: none;
}

.search-container input::placeholder {
    color: var(--text-light);
}

.content-wrapper {
    padding: 24px;
    flex: 1;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.info-bar {
    display: flex;
    gap: 24px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-item svg {
    color: var(--text-light);
}

.info-item strong {
    color: var(--text-primary);
}

.content-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.url-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 8px 0 16px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
}

.url-box-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 8px;
    margin: 8px 0 16px;
}

.url-box-link {
    flex: 1;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: var(--primary-color);
    word-break: break-all;
    text-decoration: none;
    padding: 4px 8px;
}

.url-box-link:hover {
    text-decoration: underline;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

.copy-btn svg {
    fill: currentColor;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.param-table th,
.param-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.param-table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.param-table tr:last-child td {
    border-bottom: none;
}

.online-tester-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tester-form {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
}

.response-area {
    background: #1d1d1f;
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 200px;
}

.response-area pre {
    color: #a1a1aa;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--border-light);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.code-panels {
    background: #1d1d1f;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-panel {
    display: none;
    padding: 20px;
}

.code-panel.active {
    display: block;
}

.code-panel pre {
    margin: 0;
}

.code-panel code {
    color: #a1a1aa;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.announcement-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fff8e6 0%, #fff3d6 100%);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    color: #854d0e;
    border: 1px solid #fed7aa;
}

.announcement-bar svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.api-card {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.api-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.api-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(30px);
    z-index: 1;
    background: radial-gradient(
        circle,
        rgba(255, 100, 100, 0.6),
        rgba(255, 0, 0, 0.3),
        transparent
    );
    animation: card-aurora 5s infinite ease-in-out;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.api-card:hover::before {
    opacity: 0.8;
}

@keyframes card-aurora {
    0% {
        transform: translate(-60%, -60%) scale(1);
    }
    30% {
        transform: translate(10%, -40%) scale(1.15);
    }
    60% {
        transform: translate(20%, 20%) scale(1.05);
    }
    80% {
        transform: translate(-40%, 10%) scale(1.2);
    }
    100% {
        transform: translate(-60%, -60%) scale(1);
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.api-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.api-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.api-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-light);
}

.call-count {
    font-weight: 600;
}

.flame-icon {
    width: 14px;
    height: 14px;
    animation: flame-flicker 0.8s ease-in-out infinite;
    animation-direction: alternate;
}

@keyframes flame-flicker {
    0%, 100% { transform: scaleY(1) rotate(-2deg); }
    50% { transform: scaleY(1.05) rotate(2deg); }
}

.btn-details {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
    align-self: flex-end;
}

.btn-details:hover {
    transform: translateY(-2px);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
}

.btn-details:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

.btn-details svg {
    margin-left: 6px;
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.btn-details:hover svg {
    transform: translateX(4px);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-green {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

.status-red {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.status-yellow {
    background: rgba(255, 159, 10, 0.1);
    color: #ff9f0a;
}

.status-gray {
    background: rgba(142, 142, 147, 0.1);
    color: #8e8e93;
}

.page-footer {
    background: var(--bg-primary);
    padding: 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}
.footer-links {
    margin-bottom: 8px;
}
.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.footer-sep {
    margin: 0 10px;
    opacity: 0.4;
}
.footer-copyright {
    margin: 0;
}
    border-top: 1px solid var(--border-light);
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
}

.form-link:hover {
    text-decoration: underline;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='%238e8e93'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
    outline: none;
    resize: vertical;
    min-height: 120px;
}

.form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.btn-submit, .btn-primary, .btn-danger, .btn-test {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-submit {
    width: 100%;
    background: var(--primary-color);
    color: white;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

.btn-submit:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-danger {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.btn-danger:hover {
    background: rgba(255, 69, 58, 0.2);
}

.btn-test {
    background: var(--primary-color);
    color: white;
    margin-top: 16px;
}

.btn-test:hover {
    background: var(--primary-hover);
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group .form-control {
    flex: 1;
}

.btn-send-code {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-send-code:hover:not(:disabled) {
    background: var(--border-light);
}

.btn-send-code:disabled {
    background: var(--bg-tertiary);
    color: var(--text-light);
    cursor: not-allowed;
}

.auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-box {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: url('../icon-Xtn-512x512.png') center/cover no-repeat;
    border-radius: 50%;
    text-decoration: none;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.error-message {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
}

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

.feedback-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.feedback-message.error {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.feedback-message.success {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.feedback-form-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.feedback-alert {
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.feedback-alert.success {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

.feedback-alert.error {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.feedback-alert.show {
    animation: fadeIn 0.3s ease;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.api-key-box {
    background: #1d1d1f;
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #30d158;
    word-break: break-all;
    margin-bottom: 16px;
}

.key-actions {
    display: flex;
    gap: 12px;
}

.key-actions .btn {
    flex: 1;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.success {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

.activity-icon.fail {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-light);
}

.redeem-feedback {
    margin-top: 12px;
    font-size: 13px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 24px;
}

.plan-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.plan-card:hover:not(.plan-disabled) {
    border-color: var(--primary-color);
}

.plan-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 113, 227, 0.05);
}

.plan-card.plan-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.plan-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative;
}

.free-badge {
    display: inline-block;
    background: #30d158;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.plan-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.plan-balance {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.plan-hint {
    font-size: 11px;
    color: var(--text-light);
}

.plan-exhausted {
    font-size: 11px;
    color: #ff453a;
}

.payment-methods {
    padding: 0 24px 24px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.payment-methods h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 12px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.payment-method:hover {
    border-color: var(--border-color);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background: rgba(0, 113, 227, 0.05);
}

.payment-method img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.payment-method span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-confirm-payment {
    margin: 0 24px 24px;
    width: calc(100% - 48px);
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.container .card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.container .card h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.container .card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.captcha-group {
    display: flex;
    gap: 8px;
}

.captcha-group img {
    width: 100px;
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.footer-link {
    margin-top: 24px;
}

.footer-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.footer-link a:hover {
    text-decoration: underline;
}

.result-area {
    margin-bottom: 20px;
}

.result-area .feedback {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.result-area .feedback.success {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

.result-area .feedback.error {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

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

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .online-tester-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #page-container {
        overflow-x: hidden;
    }

    /* ===== 侧边栏抽屉 ===== */
    #sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        border-right: 1px solid var(--border-light);
        border-bottom: none !important;
        background: var(--bg-primary);
        box-shadow: none;
        overflow-y: auto;
    }

    .sidebar-open #sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }

    .sidebar-open #sidebar-overlay {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    #main-content {
        margin: 0 !important;
        margin-top: 0 !important;
        min-height: 100vh;
    }

    .sidebar-header {
        position: relative !important;
        left: auto !important;
        padding: 20px;
        border-bottom: 1px solid var(--border-light);
        display: block;
    }

    .sidebar-logo {
        display: inline-block;
        margin: 0;
    }

    .user-info-panel {
        position: relative !important;
        right: auto !important;
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-light);
        align-items: flex-start;
    }

    .user-info-panel .avatar,
    .user-info-panel .username,
    .user-info-panel .email {
        display: block;
    }

    .user-info-panel .username {
        font-size: 15px;
        font-weight: 600;
        color: var(--text-primary);
    }

    .user-info-panel .email {
        font-size: 13px;
        color: var(--text-secondary);
    }

    .sidebar-auth-actions {
        flex-direction: row !important;
        width: 100%;
        gap: 8px;
        margin-top: 10px;
    }
    
    .btn-login, .btn-register {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
    }
    
    .sidebar-nav {
        flex-direction: column !important;
        padding: 8px 0 !important;
        gap: 0 !important;
        display: flex !important;
    }

    .sidebar-nav svg {
        display: inline-block !important;
    }

    .nav-link {
        padding: 14px 20px;
        border-radius: 0;
        border-left: 3px solid transparent;
        justify-content: flex-start;
        gap: 12px;
        border-bottom: none;
    }
    
    .nav-link.active {
        border-left-color: var(--primary-color);
        background: rgba(0, 113, 227, 0.06);
    }
    
    .sidebar-footer {
        position: relative !important;
        right: auto !important;
        padding: 16px 20px;
        border-top: 1px solid var(--border-light);
        order: initial;
    }
    
    .btn-logout {
        display: block;
        text-align: center;
        padding: 10px;
    }
    
    .main-header {
        display: flex;
        padding: 12px 16px;
    }
    
    #mobile-menu-btn {
        display: flex;
    }
    
    .top-header {
        padding: 32px 16px;
    }
    
    .top-header h1 {
        font-size: 28px;
    }
    
    .content-wrapper {
        padding: 16px;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .info-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .auth-box {
        padding: 24px;
    }
    
    .plans-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        padding: 16px;
    }
    
    .container .card {
        padding: 24px;
    }
    
    .captcha-group {
        flex-direction: column;
    }
    
    .captcha-group img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .sidebar-auth-actions {
        flex-direction: column;
    }
    
    .btn-login, .btn-register {
        width: 100%;
    }
    
    .key-actions {
        flex-direction: column;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
}