/* 浏览器窗口页面专用样式 */

.browser-window-page {
    background: #f5f7fa;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px; /* 保留最小内边距 */
    background: white;
    margin-bottom: 0;
    border-bottom: 1px solid #e4e7ed;
    flex-wrap: nowrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.btn-create-window {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    transition: all 0.3s;
}

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

.btn-create-window .icon {
    font-size: 14px;
}

.dropdown-arrow {
    margin-left: 3px;
    font-size: 11px;
}

.toolbar-stats {
    color: #606266;
    font-size: 12px;
    padding: 0 5px;
}

.btn-batch-clone {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    transition: all 0.3s;
}

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

.btn-batch-clone .icon {
    font-size: 14px;
}

.btn-open-package {
    background: #409eff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-open-package:hover {
    background: #66b1ff;
}

.search-dropdown select {
    padding: 6px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 12px;
    color: #606266;
    min-width: 150px;
    cursor: pointer;
}

.search-group {
    display: inline-flex;
    align-items: center;
    border-bottom: 1px solid #dcdfe6;
    padding-bottom: 4px;
    gap: 0;
}

.search-group:focus-within {
    border-bottom-color: #409eff;
}

.toolbar-right .label {
    color: #606266;
    font-size: 12px;
    margin-right: 5px;
}

.select-box {
    padding: 4px 8px 4px 0;
    border: none;
    border-radius: 0;
    font-size: 12px;
    color: #606266;
    cursor: pointer;
    background: transparent;
    margin-right: 5px;
    outline: none;
}

.search-input {
    padding: 4px 8px;
    border: none;
    border-radius: 0;
    font-size: 12px;
    width: 120px;
    transition: all 0.3s;
    background: transparent;
    margin-right: 5px;
}

.search-input:focus {
    outline: none;
}

.btn-search {
    background: transparent;
    color: #409eff;
    border: none;
    padding: 4px 8px;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-search:hover {
    color: #66b1ff;
}

.btn-export {
    background: white;
    color: #409eff;
    border: 1px solid #409eff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-export:hover {
    background: #ecf5ff;
}

/* 标签页 */
.tabs-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 0 10px; /* 保留最小内边距 */
    border-bottom: 2px solid #e4e7ed;
}

.tabs-left {
    display: flex;
    gap: 0;
}

.tabs-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tab-item {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-item:hover {
    color: #409eff;
}

.tab-item.active {
    color: #409eff;
    font-weight: 600;
    border-bottom-color: #409eff;
}

/* 操作按钮组 */
.action-buttons {
    display: none;
}

.btn-grid-view,
.btn-list-view,
.btn-card-view,
.btn-star,
.btn-layer,
.btn-refresh {
    background: white;
    border: 1px solid #dcdfe6;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    color: #606266;
}

.btn-grid-view.active,
.btn-list-view.active,
.btn-card-view.active {
    background: #409eff;
    color: white;
    border-color: #409eff;
}

.btn-more {
    background: white;
    border: 1px solid #dcdfe6;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #606266;
    transition: all 0.3s;
}

.btn-refresh {
    background: white;
    border: 1px solid #dcdfe6;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: #606266;
    transition: all 0.3s;
}

.btn-more:hover,
.btn-refresh:hover,
.btn-grid-view:hover,
.btn-list-view:hover,
.btn-card-view:hover,
.btn-star:hover,
.btn-layer:hover {
    background: #f5f7fa;
    border-color: #409eff;
}

/* 表格容器 */
.table-container {
    background: white;
    padding: 0 10px 20px 10px; /* 保留最小内边距 */
    overflow: visible; /* 不使用滚动条 */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed; /* 固定布局，使用百分比宽度 */
}

.data-table thead {
    background: #fafafa;
}

.data-table th {
    padding: 8px 6px; /* 调整内边距 */
    text-align: left;
    color: #606266;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid #e4e7ed;
    white-space: normal; /* 表头可以换行 */
    line-height: 1.3;
    word-break: break-word;
}

.data-table th .sort-arrow {
    color: #909399;
    font-size: 12px;
    margin-left: 4px;
}

.data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
    height: auto; /* 自动高度适应内容 */
}

.data-table tbody tr:hover {
    background: #f5f7fa;
}

.data-table td {
    padding: 8px 6px; /* 与th保持一致 */
    color: #606266;
    font-size: 12px;
    white-space: normal; /* 允许自然换行 */
    word-wrap: break-word; /* 长单词换行 */
    line-height: 1.4;
    vertical-align: middle;
}

/* 序号列 - 不换行 */
.data-table td:nth-child(2) {
    white-space: nowrap;
}

/* 打开列 - 居中显示，不换行 */
.data-table td:nth-child(10) {
    text-align: center;
    white-space: nowrap;
}

/* 操作列（配置、常用）- 居中显示，不换行 */
.data-table td:nth-child(9),
.data-table td:nth-child(11) {
    text-align: center;
    white-space: nowrap;
}

.platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.ip-info {
    display: flex;
    align-items: center;
    gap: 4px; /* 减少间距 */
}

.country-flag {
    font-size: 16px; /* 减小国旗图标 */
}

.ip-location {
    font-size: 11px; /* 减小字体 */
    color: #909399;
}

.time-icon {
    font-size: 12px;
    color: #909399;
}

.open-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px; /* 适度间距 */
    min-width: 90px; /* 确保按钮有足够空间 */
    padding: 5px 0; /* 上下内边距 */
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px; /* 更紧凑的内边距 */
    border-radius: 12px;
    font-size: 11px; /* 更小的字体 */
    font-weight: 500;
}

.status-open {
    background: #e1f3ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

.open-time {
    font-size: 10px; /* 更小的字体 */
    color: #909399;
    white-space: nowrap;
}

.btn-icon-small {
    background: transparent;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 16px;
    color: #909399;
    transition: all 0.3s;
}

.btn-icon-small:hover {
    color: #409eff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 10px; /* 保留最小内边距 */
    background: white;
    margin-top: 0;
    gap: 8px;
}

.pagination-left,
.pagination-right {
    display: flex;
    gap: 4px;
}

.page-btn {
    background: white;
    border: 1px solid #dcdfe6;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #606266;
    transition: all 0.3s;
}

.page-btn.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    position: relative;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: #606266;
}

.page-btn .btn-svg {
    display: block;
}

.page-btn .btn-icon {
    font-size: 16px;
}

.page-btn .btn-text {
    display: none;
}

/* 不同按钮的颜色 */
.btn-open {
    color: #67c23a;
}

.btn-open:hover {
    background: #f0f9ff;
    color: #409eff;
}

.btn-close {
    color: #e6a23c;
}

.btn-close:hover {
    background: #fdf6ec;
    color: #e6a23c;
}

.btn-stop {
    color: #909399;
}

.btn-stop:hover {
    background: #f4f4f5;
    color: #606266;
}

.btn-restart {
    color: #409eff;
}

.btn-restart:hover {
    background: #ecf5ff;
    color: #409eff;
}

.btn-delete {
    color: #f56c6c;
}

.btn-delete:hover {
    background: #fef0f0;
    color: #f56c6c;
}

.page-btn:hover {
    background: #f5f7fa;
    border-color: transparent;
}

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

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

.pagination-size {
    color: #606266;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-size:hover {
    background: transparent;
    color: #303133;
}

.page-nav-btn {
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #606266;
    transition: all 0.3s;
    font-size: 16px;
}

.page-nav-btn:hover {
    background: transparent;
    color: #303133;
}

.page-nav-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.page-num {
    background: transparent;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: #606266;
    transition: all 0.3s;
    min-width: 28px;
    font-size: 14px;
}

.page-num.active {
    background: transparent;
    color: #303133;
    font-weight: 500;
}

.page-num:hover:not(.active) {
    background: transparent;
    color: #303133;
}

.pagination-jump {
    color: #606266;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}

.pagination-jump input {
    width: 50px;
    padding: 4px 8px;
    border: none;
    border-bottom: 1px solid #dcdfe6;
    border-radius: 0;
    text-align: center;
    font-size: 13px;
    background: transparent;
}

.pagination-jump input:focus {
    outline: none;
    border-bottom-color: #dcdfe6;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
}

/* 创建窗口侧边栏 */
.create-window-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.create-window-sidebar.active {
    display: block;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: auto;
}

.sidebar-panel {
    position: absolute;
    z-index: 10;
    right: 0;
    top: 0;
    width: 600px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
    pointer-events: auto;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7f9fc;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    color: #303133;
    font-weight: 600;
}

.window-limit-tip {
    margin-left: 15px;
    font-size: 14px;
    color: #f56c6c;
    font-weight: 500;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 28px;
    color: #909399;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.sidebar-close:hover {
    background: #e4e7ed;
    color: #303133;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

.form-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #409eff;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    color: #606266;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #409eff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #c0c4cc;
}

.form-textarea {
    resize: vertical;
    font-family: inherit;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #909399;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.char-count span {
    color: #606266;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #606266;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #606266;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.info-icon {
    color: #909399;
    font-size: 14px;
    cursor: help;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
}

.btn-link {
    background: none;
    border: none;
    color: #409eff;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
}

.btn-link:hover {
    color: #66b1ff;
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid #e4e7ed;
    background: #f7f9fc;
}

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

.btn-random:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #f5f7fa;
    color: #606266;
    border: 1px solid #dcdfe6;
}

.btn-cancel:hover {
    background: #e4e7ed;
}

.btn-confirm {
    background: #409eff;
    color: white;
}

.btn-confirm:hover {
    background: #66b1ff;
}

/* 代理设置 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
}

.form-col {
    flex: 1;
    margin-bottom: 0;
}

.proxy-ip-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.proxy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f56c6c;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.proxy-input {
    flex: 1;
    margin: 0;
}

.btn-icon-action {
    width: 32px;
    height: 32px;
    background: #f5f7fa;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    color: #606266;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-action:hover {
    background: #ecf5ff;
    border-color: #409eff;
    color: #409eff;
}

.btn-proxy-check {
    padding: 8px 16px;
    background: #ecf5ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-proxy-check:hover {
    background: #409eff;
    color: white;
    border-color: #409eff;
}
