/* Token池管理系统 - 自定义样式 */

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* 卡片样式 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 状态卡片特殊样式 */
.card.bg-primary,
.card.bg-info,
.card.bg-success,
.card.bg-warning {
    border: none;
}

.card.bg-primary:hover,
.card.bg-info:hover,
.card.bg-success:hover,
.card.bg-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* 按钮组样式 */
.btn-group .btn {
    margin-right: 0.5rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 日志容器样式 */
.log-container {
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.log-entry {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: white;
    border-left: 3px solid #0d6efd;
}

.log-entry.success {
    border-left-color: #198754;
}

.log-entry.error {
    border-left-color: #dc3545;
}

.log-entry.warning {
    border-left-color: #ffc107;
}

/* 进度条样式 */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* 主页面切换动画样式 - 避免与Bootstrap Tab冲突 */
.main-tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

.main-tab-content.d-none {
    animation: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast 提示样式 */
.toast {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* 系统状态徽章 */
#system-status {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 数据表格样式 */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        margin-right: 0;
    }
}

/* 加载状态样式 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.online {
    background-color: #198754;
    animation: pulse-green 2s infinite;
}

.status-indicator.offline {
    background-color: #dc3545;
}

.status-indicator.warning {
    background-color: #ffc107;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

/* Token列表样式 */
.token-item {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.token-item:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    transform: translateX(5px);
}

.token-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #0d6efd;
}

.token-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.token-status.ready {
    background-color: #d1ecf1;
    color: #0c5460;
}

.token-status.available {
    background-color: #d4edda;
    color: #155724;
}

.token-status.used {
    background-color: #f8d7da;
    color: #721c24;
}

/* 统计数字动画 */
.counter {
    font-weight: 700;
    transition: all 0.3s ease;
}

.counter.updating {
    animation: counterUpdate 0.5s ease;
}

@keyframes counterUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: #0d6efd;
    }
    100% {
        transform: scale(1);
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: #212529;
    border-radius: 6px;
}

/* 页面切换动画 */
.page-transition {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 操作按钮悬浮效果 */
.action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #212529;
        color: white;
    }
    
    .card {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .form-control {
        background-color: #2d3748;
        border-color: #4a5568;
        color: white;
    }
    
    .log-container {
        background-color: #2d3748;
        border-color: #4a5568;
        color: white;
    }
} 