/* 企微群聊机器人Web界面样式 */

/* 全局样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.7;
    font-weight: 500;
    font-size: 16px;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-bottom: none;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.navbar-brand i {
    margin-right: 8px;
    color: #ffc107 !important;
}

.nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition);
    border-radius: 0.375rem;
    padding: 0.6rem 1.2rem !important;
    margin: 0 0.25rem;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    font-weight: 700;
}

/* 主要内容区域 */
main {
    position: relative;
    z-index: 10;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 800;
    color: #1a1a1a;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
}

.card-body {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    color: #2c3e50;
    font-weight: 500;
}

/* 按钮样式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: var(--transition);
    border: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    text-transform: none;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn i {
    margin-right: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
    border: none;
    color: var(--dark-color);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%);
    border: none;
}

/* 表单样式 */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    transition: var(--transition);
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.form-text {
    font-size: 0.9rem;
    color: #495057;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    display: inline-block;
    backdrop-filter: blur(5px);
    font-weight: 500;
}

/* 状态指示器 */
.scheduler-icon {
    font-size: 2.5rem;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.scheduler-icon.running {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    animation: rotate 3s linear infinite;
}

.scheduler-icon.stopped {
    background: linear-gradient(135deg, var(--danger-color) 0%, #bd2130 100%);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 消息预览样式 */
.message-preview {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    min-height: 150px;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

/* 徽章样式 */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 手风琴样式 */
.accordion-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
    font-weight: 600;
    color: var(--dark-color);
    border: none;
    transition: var(--transition);
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.accordion-button:hover {
    background: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
    transform: translateY(-1px);
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(5px);
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    backdrop-filter: blur(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.25rem;
    font-size: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9) 0%, rgba(32, 201, 151, 0.8) 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9) 0%, rgba(189, 33, 48, 0.8) 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.9) 0%, rgba(224, 168, 0, 0.8) 100%);
    color: var(--dark-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.9) 0%, rgba(19, 132, 150, 0.8) 100%);
    color: white;
}

/* 模态框样式 */
.modal {
    backdrop-filter: blur(10px);
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 700;
    backdrop-filter: blur(5px);
}

.modal-footer {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

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

/* 表格样式 */
.table {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.table th {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(0, 86, 179, 0.1) 100%);
    font-weight: 800;
    color: #1a1a1a;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
}

.table td {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    color: #2c3e50;
    font-weight: 500;
    padding: 0.875rem 0.75rem;
}

/* 代码样式 */
code {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(0, 86, 179, 0.1) 100%);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

pre {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 0.875rem;
    backdrop-filter: blur(5px);
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* 分页样式 */
.pagination .page-link {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--dark-color);
    margin: 0 0.125rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

/* 页脚样式 */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 2rem 0;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 2rem rgba(255, 255, 255, 0.2);
}

/* 统计卡片 */
.stat-card {
    text-align: center;
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

.stat-card h6 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1.5rem;
    }

    .scheduler-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 2rem;
    }

    .stat-card .stat-number {
        font-size: 2rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .message-preview {
        min-height: 100px;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-number {
        font-size: 1.75rem;
    }
}

/* 特殊效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glow-effect {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 选择框样式 */
.form-select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* 增强文本可读性的通用样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    color: #1a1a1a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

p {
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.text-muted {
    color: #495057 !important;
    font-weight: 500 !important;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1a1a1a;
        --dark-color: #f8f9fa;
        --secondary-color: #6c757d;
    }

    body {
        color: #e9ecef;
    }

    .card-body,
    .form-control,
    .table td,
    code,
    pre {
        background: rgba(0, 0, 0, 0.7);
        color: var(--dark-color);
    }

    .modal-content,
    .modal-header,
    .modal-footer {
        background: rgba(0, 0, 0, 0.85);
        color: var(--dark-color);
    }

    .message-preview {
        background: rgba(0, 0, 0, 0.7);
        color: var(--dark-color);
        border-color: rgba(255, 255, 255, 0.15);
    }

    h1, h2, h3, h4, h5, h6 {
        color: #f8f9fa;
    }

    .text-muted {
        color: #adb5bd !important;
    }
}