/* 全局样式 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.modal-backdrop {
    z-index: 9999 !important;
}

.modal {
    z-index: 10000 !important;
}

/* 模态框样式 */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

/* 页脚样式 */
.footer {
    margin-top: auto;
}

/* 卡片样式 */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 表单样式 */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 按钮样式 */
.btn-primary {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 系统状态卡片样式 */
.card.bg-light {
    transition: transform 0.2s;
}

.card.bg-light:hover {
    transform: translateY(-5px);
}

/* 开放平台页面样式 */
.platform-overview {
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
}

.stat-info h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.providers-section {
    margin: 3rem 0;
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.provider-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.provider-icon {
    font-size: 2.5rem;
}

.provider-info h3 {
    margin: 0;
    color: #333;
}

.provider-info p {
    margin: 0.5rem 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.provider-actions {
    display: flex;
    gap: 0.5rem;
}

.quick-actions {
    margin: 3rem 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.action-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.action-icon {
    font-size: 2rem;
}

.action-info h3 {
    margin: 0;
    color: #333;
}

.action-info p {
    margin: 0.5rem 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.login-prompt {
    margin: 3rem 0;
    text-align: center;
}

.prompt-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 0 auto;
}

.prompt-card h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

/* API页面样式 */
.provider-info {
    margin: 2rem 0;
}

.provider-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.provider-icon {
    font-size: 3rem;
}

.provider-details h3 {
    margin: 0;
    color: #333;
}

.provider-details p {
    margin: 0.5rem 0;
    color: #666;
}

.base-url {
    font-size: 0.9rem;
}

.base-url code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-controls select {
    min-width: 150px;
}

.apis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.api-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.api-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.api-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.api-method {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.api-method.GET { background: #e8f5e8; color: #2d5a2d; }
.api-method.POST { background: #fff3cd; color: #856404; }
.api-method.PUT { background: #d1ecf1; color: #0c5460; }
.api-method.DELETE { background: #f8d7da; color: #721c24; }

.api-info h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.api-description {
    margin: 0.5rem 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.api-details {
    margin-bottom: 1rem;
}

.api-endpoint {
    margin-bottom: 0.8rem;
}

.api-endpoint code {
    background: #f5f5f5;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    word-break: break-all;
}

.params-list, .headers-list {
    margin: 0.5rem 0;
    padding-left: 1rem;
}

.params-list li, .headers-list li {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.params-list code, .headers-list code {
    background: #f5f5f5;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.api-actions {
    display: flex;
    gap: 0.5rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.test-result {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.result-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.tab-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    max-height: 300px;
    font-size: 0.9rem;
}

/* Header页面样式 */
:root {
    --primary-color: #6366F1;
    --secondary-color: #4F46E5;
    --dark-color: #1a1c2d;
    --light-color: #F8FAFC;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.footer {
    margin-top: auto;
}

.navbar {
    background: linear-gradient(135deg, var(--dark-color) 0%, #131525 100%) !important;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0.5rem 0;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    margin: 0 0.1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(99,102,241,0.2);
    color: var(--primary-color) !important;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    color: white;
    font-weight: 500;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--dark-color);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
        
        /* 添加展开收起动画 */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .navbar-collapse.show {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
    }
    
    /* 导航切换按钮动画 */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
        transition: all 0.2s ease;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-toggler-icon {
        transition: all 0.2s ease;
    }
    
    .navbar-toggler:not(.collapsed) .navbar-toggler-icon {
        transform: rotate(90deg);
    }
}

/* 按钮样式优化 */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 卡片样式优化 */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Bootstrap下拉菜单样式优化 */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--dark-color);
}

.dropdown-menu.show {
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    color: var(--light-color);
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(255,255,255,0.1);
    color: var(--primary-color);
}

.dropdown-item.active {
    background: rgba(99,102,241,0.2);
    color: var(--primary-color);
}

.dropdown-divider {
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 下拉菜单特殊样式 */
.navbar-nav .dropdown-menu {
    min-width: 180px;
}

/* 确保下拉菜单按钮样式正确 */
.nav-link.dropdown-toggle {
    background: none !important;
    border: none !important;
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
}

.nav-link.dropdown-toggle:hover {
    color: white !important;
    background: rgba(255,255,255,0.1) !important;
}

.nav-link.dropdown-toggle:focus {
    box-shadow: none !important;
    outline: none !important;
    color: white !important;
}

.nav-link.dropdown-toggle:active,
.nav-link.dropdown-toggle.show {
    color: white !important;
    background: rgba(255,255,255,0.1) !important;
}

/* 移动端下拉菜单优化 */
@media (max-width: 991.98px) {
    .dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
        backdrop-filter: blur(10px);
        background: rgba(26, 28, 45, 0.95) !important;
    }
    
    /* 移动端菜单项优化 */
    .dropdown-item {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }
}

/* 响应式优化 - 移动端导航链接样式 */
@media (max-width: 767.98px) {
    .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem;
    }
}

/* 导航栏移动端优化 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(26, 28, 45, 0.98);
        border-radius: 8px;
        margin-top: 0.5rem;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 6px;
        transition: background-color 0.2s ease;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
    }
    
    .dropdown-menu {
        background: rgba(26, 28, 45, 0.95);
        border: 1px solid rgba(255,255,255,0.1);
        margin-top: 0.5rem;
        position: static !important;
        transform: none !important;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    }
    
    .dropdown-item {
        color: rgba(255,255,255,0.9);
        padding: 0.75rem 1rem;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: rgba(255,255,255,0.1);
        color: white;
    }
}

.prompt-card p {
    margin: 0 0 1.5rem 0;
    color: #666;
}

/* 移动端表格优化 */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        vertical-align: middle;
    }
    
    .table th:first-child,
    .table td:first-child {
        padding-left: 0.5rem;
    }
    
    .table th:last-child,
    .table td:last-child {
        padding-right: 0.5rem;
    }
    
    /* 卡密码列优化 */
    .table td code {
        font-size: 0.75rem;
        word-break: break-all;
    }
    
    /* 按钮优化 */
    .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    /* 徽章优化 */
    .badge {
        font-size: 0.7rem;
    }
}

@media (max-width: 575.98px) {
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.2rem;
    }
    
    .table td code {
        max-width: 80px !important;
        font-size: 0.7rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.3rem;
        font-size: 0.7rem;
    }
    
    .btn-sm i {
        font-size: 0.8rem;
    }
}