/* 小红书聚光广告工具 - 样式表 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
}

/* ========== 登录页面 ========== */
.login-body {
    background: linear-gradient(135deg, #ff2442 0%, #ff6b6b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #ff2442 0%, #ff6b6b 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 13px;
    opacity: 0.9;
}

.login-form {
    padding: 30px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #ff2442;
    box-shadow: 0 0 0 3px rgba(255,36,66,0.1);
}

.login-error {
    color: #ff2442;
    font-size: 13px;
    margin-bottom: 15px;
    min-height: 20px;
    text-align: center;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff2442 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(255,36,66,0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #f0f0f0;
}

/* ========== 主页面 ========== */
.top-header {
    background: linear-gradient(135deg, #ff2442 0%, #ff6b6b 100%);
    color: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    font-size: 14px;
}

.license-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.btn-logout {
    color: white;
    text-decoration: none;
    padding: 6px 15px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.2);
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 选项卡 */
.tab-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #f5f7fa;
    color: #333;
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff2442 0%, #ff6b6b 100%);
    color: white;
    font-weight: 500;
}

.tab-content {
    margin-bottom: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 面板 */
.panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.panel h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.panel-desc {
    color: #999;
    font-size: 13px;
    margin-bottom: 20px;
}

/* 表单 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff2442;
    box-shadow: 0 0 0 3px rgba(255,36,66,0.1);
}

.input-lg {
    padding: 12px 15px !important;
    font-size: 14px !important;
}

.textarea-lg {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    transition: all 0.3s;
}

.textarea-lg:focus {
    outline: none;
    border-color: #ff2442;
    box-shadow: 0 0 0 3px rgba(255,36,66,0.1);
}

.textarea-md {
    min-height: 80px !important;
}

.input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-row input {
    flex: 1;
}

/* 按钮 */
.btn-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

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

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff2442 0%, #ff6b6b 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 结果框 */
.result-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.result-box.show {
    display: block;
}

.result-box .success {
    color: #52c41a;
    font-weight: 600;
}

.result-box .error {
    color: #ff4d4f;
    font-weight: 600;
}

.result-box .warning {
    color: #faad14;
    font-weight: 600;
}

.result-box pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 10px 0;
    font-size: 12px;
}

.result-box .field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.result-box .field-item {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #ff2442;
}

.result-box .field-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 3px;
}

.result-box .field-value {
    font-size: 13px;
    color: #333;
    word-break: break-all;
}

/* 日志面板 */
.log-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.log-header {
    background: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.log-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.8;
    background: #fafafa;
}

.log-content .log-info {
    color: #1890ff;
}

.log-content .log-success {
    color: #52c41a;
}

.log-content .log-error {
    color: #ff4d4f;
}

.log-content .log-warning {
    color: #faad14;
}

.log-content .log-time {
    color: #999;
    margin-right: 8px;
}

/* 帮助内容 */
.help-content {
    line-height: 1.8;
    color: #666;
}

.help-content h4 {
    color: #333;
    margin: 15px 0 8px;
    font-size: 14px;
}

.help-content ul,
.help-content ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.help-content li {
    margin-bottom: 5px;
}

.help-content b {
    color: #ff2442;
}

/* 响应式 */
@media (max-width: 768px) {
    .top-header {
        padding: 0 15px;
    }
    
    .main-container {
        padding: 10px;
    }
    
    .panel {
        padding: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
