* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
}

/* 登录弹窗样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    backdrop-filter: blur(5px);
}

.login-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 9999;
    animation: loginSlideIn 0.4s ease-out;
}

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

.login-header {
    margin-bottom: 30px;
}

.login-header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.login-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-body .form-group {
    text-align: left;
}

.login-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.login-body .form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.login-body .form-group input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-body .form-group input::placeholder {
    color: #999;
}

.login-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-error {
    color: #e74c3c;
    font-size: 14px;
    min-height: 20px;
    padding: 8px;
    border-radius: 4px;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    display: none;
}

.login-error.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.container {
    display: flex;
    height: 100vh;
}

/* 左侧状态栏 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
    position: relative;
    z-index: 1000;
}

/* 移动端侧边栏切换按钮 */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #2c3e50;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #34495e;
    transform: scale(1.05);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background-color: white;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.sidebar-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 侧边栏收起状态 */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* 遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.menu-item {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: #34495e;
    color: #3498db;
    border-left-color: #3498db;
}

.menu-item.active {
    background-color: #34495e;
    color: #3498db;
    border-left-color: #3498db;
}

.menu-item.logout-btn {
    color: #e74c3c !important;
}

.menu-item.logout-btn:hover {
    background-color: #c0392b !important;
    color: white !important;
    border-left-color: #e74c3c !important;
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
    display: inline-block;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

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

.content-header {
    background: white;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.content-header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.content-body {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 400px;
}

/* 用户管理样式 */
.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 用户列表样式 */
.user-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-controls {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

.search-box button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.refresh-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn::before {
    content: "↻";
    font-size: 16px;
    display: inline-block;
}

.refresh-btn.loading::before {
    animation: spin 1s linear infinite;
}

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

.user-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
}

.user-table thead {
    background-color: #f8f9fa;
}

.user-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    font-size: 14px;
}

.user-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

.user-table tbody tr {
    transition: background-color 0.2s;
}

.user-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 头像样式 */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* 状态样式 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-online {
    background-color: #d4edda;
    color: #155724;
}

.status-offline {
    background-color: #f8d7da;
    color: #721c24;
}

.status-busy {
    background-color: #fff3cd;
    color: #856404;
}

/* 统计数字样式 */
.stat-item {
    text-align: center;
}

.stat-success {
    color: #27ae60;
    font-weight: 600;
}

.stat-failed {
    color: #e74c3c;
    font-weight: 600;
}

/* IP地址样式 */
.ip-address {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #666;
}

/* 备注样式 */
.remark-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.remark-text:hover {
    color: #3498db;
}

/* 分页样式 */
.pagination {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:hover {
    background: #f8f9fa;
}

.pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination button:disabled {
    background: #f8f9fa;
    color: #999;
    cursor: not-allowed;
}

.page-info {
    color: #666;
    font-size: 14px;
}

/* 发布平台样式 */
.publish-form {
    max-width: 800px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
}

.platform-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

.kuaishou-badge {
    background: #ff6b35;
    color: white;
}

.douyin-badge {
    background: #fe2c55;
    color: white;
}

/* 用户选择器样式 */
.user-selector {
    margin-bottom: 25px;
}

.user-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.user-selector-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.selected-count {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.user-selector-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.user-selector-controls input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-selector-controls input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.user-selector-controls input::placeholder {
    color: #999;
}

.user-selector-controls button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.user-selector-controls button:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-selector-controls button:active {
    transform: translateY(0);
}

.btn-search {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
}

.btn-search:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
}

.btn-reset {
    background: #95a5a6;
    color: white;
    border: none;
}

.btn-reset:hover {
    background: #7f8c8d;
}

.btn-reset:active {
    background: #707b7c;
    transform: rotate(180deg) scale(0.95);
}

.btn-search:active {
    transform: translateY(0) scale(0.95);
}

/* 加载状态 */
.btn-search.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn-reset.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* 横屏手机优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        height: 60px;
        padding: 10px 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }
    
    .sidebar-header {
        display: none;
    }
    
    .menu-item {
        display: inline-block;
        width: auto;
        padding: 10px 15px;
        border-bottom: none;
        border-right: 1px solid #34495e;
    }
    
    .menu-item:hover {
        border-right-color: #3498db;
    }
    
    .menu-item.active {
        border-right-color: #3498db;
    }
    
    .main-content {
        order: 2;
    }
    
    .user-list-container {
        max-height: 120px;
    }
}

.btn-reset:active {
    background: #707b7c;
}

.user-list-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 60px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.user-item:last-child {
    border-bottom: none;
}

.user-item:hover {
    background-color: #f8f9fa;
}

.user-item.selected {
    background-color: #e3f2fd;
}

.user-item input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.user-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1;
}

.user-id {
    font-size: 11px;
    color: #666;
    line-height: 1;
}

.user-status {
    margin-left: auto;
}

.status-small {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.status-small.online {
    background: #d4edda;
    color: #155724;
}

.status-small.offline {
    background: #f8d7da;
    color: #721c24;
}

.status-small.busy {
    background: #fff3cd;
    color: #856404;
}

/* 响应式设计 - 手机版 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    /* 显示侧边栏切换按钮 */
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        padding: 20px 0;
        order: 2;
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    
    .sidebar-header {
        padding: 0 15px 15px;
        text-align: center;
    }
    
    .menu-item {
        padding: 12px 15px;
        font-size: 14px;
        border-left: none;
        border-bottom: 1px solid #34495e;
    }
    
    .menu-item:hover {
        border-left: none;
        border-bottom-color: #3498db;
    }
    
    .menu-item.active {
        border-left: none;
        border-bottom-color: #3498db;
    }
    
    .main-content {
        padding: 15px;
        order: 1;
    }
    
    .content-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .content-header h1 {
        font-size: 22px;
    }
    
    .content-body {
        padding: 15px;
    }
    
    /* 用户统计卡片 */
    .user-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* 表格控制 */
    .table-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .search-box button {
        width: 100%;
        padding: 10px;
    }
    
    .refresh-btn {
        width: 100%;
        padding: 10px;
        justify-content: center;
    }
    
    /* 用户表格 */
    .user-table-container {
        overflow-x: auto;
        border-radius: 0;
    }
    
    .user-table {
        min-width: 800px;
        font-size: 12px;
    }
    
    .user-table th,
    .user-table td {
        padding: 8px 4px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    /* 分页 */
    .pagination {
        padding: 15px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination button {
        padding: 6px 10px;
        font-size: 12px;
        flex: 1;
        min-width: 60px;
    }
    
    .page-info {
        width: 100%;
        text-align: center;
        font-size: 12px;
        margin: 10px 0;
    }
    
    /* 发布页面 */
    .publish-form {
        max-width: 100%;
    }
    
    .user-selector {
        margin-bottom: 20px;
    }
    
    .user-selector-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .selected-count {
        align-self: center;
    }
    
    .user-selector-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-selector-controls input {
        width: 100%;
    }
    
    .user-selector-controls button {
        width: 100%;
        padding: 10px;
    }
    
    .user-list-container {
        max-height: 200px;
    }
    
    .user-item {
        padding: 10px;
    }
    
    .user-item img {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    
    .user-name {
        font-size: 13px;
    }
    
    .user-id {
        font-size: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 14px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
    
    /* 状态标签 */
    .status-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .platform-badge {
        font-size: 11px;
        padding: 3px 10px;
        margin-bottom: 15px;
    }
    
    /* 备注文本 */
    .remark-text {
        max-width: 60px;
        font-size: 11px;
    }
    
    /* IP地址 */
    .ip-address {
        font-size: 10px;
    }
}

/* 登录弹窗移动端响应式 */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
    
    .login-btn {
        padding: 16px;
        font-size: 16px;
    }
}

/* 小屏幕手机 */
@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .user-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-number {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    .content-header {
        padding: 12px;
        text-align: center;
    }
    
    .content-header h1 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .content-body {
        padding: 12px;
    }
    
    .user-table th,
    .user-table td {
        padding: 6px 2px;
        font-size: 11px;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .pagination button {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 50px;
    }
    
    .user-item {
        padding: 8px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 8px;
        font-size: 13px;
    }
    
    .submit-btn {
        padding: 10px;
        font-size: 15px;
    }
}