/**
 * 智分盾 - 环境管理页面现代化样式
 * 深蓝科技风格，卡片化设计
 */

/* ========================================
   页面整体背景
   ======================================== */
.browser-window-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: calc(100vh - 48px);
    padding: 24px !important;
}

/* ========================================
   工具栏卡片化
   ======================================== */
.toolbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 创建窗口按钮 */
.btn-create-window {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-create-window:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-create-window svg,
.btn-batch-clone svg,
.btn-open-package svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.btn-create-window span,
.btn-batch-clone span,
.btn-open-package span {
    display: inline-flex;
    align-items: center;
}

/* 批量克隆按钮 */
.btn-batch-clone {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.btn-batch-clone:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 160, 71, 0.4);
}

/* 开通套餐链接 - 纯文字样式 */
.btn-open-package-link {
    color: #00b4d8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-open-package-link:hover {
    color: #0096c7;
    background: rgba(0, 180, 216, 0.1);
}

/* 工具栏统计信息 */
.toolbar-stats {
    color: #606266 !important;
    font-size: 13px !important;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

/* ========================================
   标签页现代化
   ======================================== */
.tabs-bar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px 12px 0 0 !important;
    padding: 12px 20px !important;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
}

.tabs-left {
    display: flex;
    gap: 8px;
}

/* 标签页 - 下划线设计 */
.tab-item {
    background: transparent;
    color: #6b7280;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 24px;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

.tab-item:hover {
    color: #00b4d8;
    border-bottom-color: rgba(0, 180, 216, 0.3);
}

.tab-item.active {
    color: #00b4d8;
    border-bottom-color: #00b4d8;
    background: transparent;
}

.tab-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00b4d8 0%, #0096c7 100%);
    border-radius: 0 0 3px 3px;
}

/* ========================================
   表格容器优化
   ======================================== */
.table-container {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border-radius: 0 0 12px 12px !important;
    padding: 0 !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    overflow: hidden;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table thead th {
    color: white !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 16px 12px !important;
    text-align: left;
    border: none !important;
    white-space: nowrap;
}

.data-table thead th .sort-arrow {
    opacity: 0.6;
    margin-left: 4px;
    font-size: 12px;
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.04) !important;
}

.data-table tbody td {
    padding: 14px 12px !important;
    font-size: 13px !important;
    color: #303133;
    border: none !important;
    vertical-align: middle;
}


/* ========================================
   数据标签样式
   ======================================== */

/* 代理IP标签 - 圆角药丸设计 */
.proxy-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.proxy-badge.proxy-high {
    background: #10b981;
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.proxy-badge.proxy-medium {
    background: #f59e0b;
    color: white;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.proxy-badge.proxy-low {
    background: #ef4444;
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* 分组标签 - 带边框的清新设计 */
.group-tag {
    display: inline-block;
    padding: 5px 14px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 账号平台标签 */
.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

/* 备注标签 */
.remark-text {
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
}

/* 时间标签 */
.time-text {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

/* ========================================
   表格内按钮样式 - 每个都独特设计
   ======================================== */

/* 打开按钮 - 渐变蓝色药丸设计 */
.btn-action.btn-open-window,
.btn-open-window {
    color: white !important;
    border: none !important;
    padding: 7px 18px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 未运行状态（停止/打开按钮） - 蓝色 */
.btn-action.btn-open-window.btn-stopped,
.btn-open-window.btn-stopped,
.btn-action.btn-open-window:not(.btn-running):not(.btn-disabled),
.btn-open-window:not(.btn-running):not(.btn-disabled) {
    background: linear-gradient(90deg, #00b4d8 0%, #0096c7 100%) !important;
    box-shadow: 0 2px 6px rgba(0, 150, 199, 0.25) !important;
}

.btn-action.btn-open-window.btn-stopped:hover,
.btn-open-window.btn-stopped:hover,
.btn-action.btn-open-window:not(.btn-running):not(.btn-disabled):hover,
.btn-open-window:not(.btn-running):not(.btn-disabled):hover {
    background: linear-gradient(90deg, #0096c7 0%, #0077b6 100%) !important;
    box-shadow: 0 3px 10px rgba(0, 150, 199, 0.4) !important;
}

/* 光泽效果 */
.btn-action.btn-open-window::before,
.btn-open-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-action.btn-open-window:hover::before,
.btn-open-window:hover::before {
    left: 100%;
}

/* 运行中状态 - 红色警告色 */
.btn-action.btn-open-window.btn-running,
.btn-open-window.btn-running {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
}

.btn-action.btn-open-window.btn-running:hover,
.btn-open-window.btn-running:hover {
    background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.4) !important;
}

/* 禁用状态 */
.btn-action.btn-open-window:disabled,
.btn-action.btn-open-window.btn-disabled,
.btn-open-window:disabled,
.btn-open-window.btn-disabled {
    background: linear-gradient(90deg, #d1d5db 0%, #9ca3af 100%) !important;
    color: #6b7280 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

.btn-action.btn-open-window:disabled::before,
.btn-action.btn-open-window.btn-disabled::before,
.btn-open-window:disabled::before,
.btn-open-window.btn-disabled::before {
    display: none;
}

/* 平台按钮 - 紫色圆形图标按钮 */
.btn-platform {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(168, 85, 247, 0.25);
    transition: all 0.3s ease;
}

.btn-platform:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px) rotate(5deg);
}

.btn-platform:active {
    transform: translateY(0) rotate(0deg);
}

.btn-platform svg {
    width: 16px;
    height: 16px;
}

/* 配置按钮 - 绿色圆形齿轮按钮 */
.btn-config {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    transition: all 0.3s ease;
}

.btn-config:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px) rotate(90deg);
}

.btn-config:active {
    transform: translateY(0) rotate(0deg);
}

.btn-config svg {
    width: 16px;
    height: 16px;
}

/* 常用星标 - 爱心收藏设计 */
.favorite-star {
    font-size: 26px;
    cursor: pointer;
    display: inline-block;
    color: #d1d5db;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    user-select: none;
}

.favorite-star:hover {
    color: #fca5a5;
    transform: scale(1.1);
}

.favorite-star.active {
    color: #ef4444;
    animation: heartPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3) rotate(-10deg);
    }
    75% {
        transform: scale(0.9) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* 窗口名称链接样式 */
.window-name {
    color: #667eea !important;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    background: rgba(102, 126, 234, 0.05);
}

.window-name:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #5568d3 !important;
}

/* 编辑按钮 - 独特的图标按钮 */
.btn-edit {
    background: transparent;
    color: #8b5cf6;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* Checkbox 美化 */
.data-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    border-radius: 4px;
}

/* ========================================
   分页栏优化
   ======================================== */
.pagination {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px !important;
    padding: 16px 20px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-left {
    display: flex;
    gap: 8px;
}

/* ========================================
   分页栏操作按钮样式
   ======================================== */

.page-btn.btn-action {
    background: white;
    border: 1.5px solid #e5e7eb;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 12px;
}

.page-btn.btn-action svg {
    width: 14px;
    height: 14px;
}

/* 打开按钮 - 绿色 */
.btn-action.btn-open {
    border-color: #10b981;
    color: #10b981;
}

.btn-action.btn-open:hover {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* 关闭按钮 - 橙色 */
.btn-action.btn-close {
    border-color: #f59e0b;
    color: #f59e0b;
}

.btn-action.btn-close:hover {
    background: #f59e0b;
    color: white;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* 停止按钮 - 蓝色 */
.btn-action.btn-stop {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-action.btn-stop:hover {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* 删除按钮 - 红色 */
.btn-action.btn-delete {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-action.btn-delete:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.pagination-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-info {
    color: #606266;
    font-size: 13px;
}

/* 分页按钮 - 扁平圆角设计 */
.page-nav-btn,
.page-num {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.page-nav-btn:hover,
.page-num:hover {
    background: #e5e7eb;
    color: #374151;
}

.page-num.active {
    background: linear-gradient(90deg, #00b4d8 0%, #0096c7 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(0, 150, 199, 0.3);
}

/* ========================================
   空状态优化
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    color: #606266;
    margin-bottom: 20px;
}

.empty-state-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* ========================================
   序号列样式
   ======================================== */
.row-number {
    font-weight: 700;
    color: #9ca3af;
    font-size: 14px;
}

/* ========================================
   响应式优化
   ======================================== */
@media (max-width: 1400px) {
    .browser-window-page {
        padding: 16px !important;
    }
    
    .data-table thead th,
    .data-table tbody td {
        padding: 12px 8px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 1200px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .toolbar-left {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ========================================
   加载状态
   ======================================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   滚动条美化
   ======================================== */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

