/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #667eea;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 30px;
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
}

header h1 {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 5px;
}

header .subtitle {
    color: #888;
    font-size: 14px;
}

.logout-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: #f44336;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #d32f2f;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.config-section, .log-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.config-section {
    flex: 0 0 400px;
}

.log-section {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
}

.config-section h2, .log-section h2 {
    font-size: 20px;
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

#quota-display {
    color: #667eea;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    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: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-info {
    background: #2196F3;
    color: white;
}

.btn-info:hover {
    background: #1976D2;
}

.btn-warning {
    background: #FF9800;
    color: white;
}

.btn-warning:hover {
    background: #F57C00;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

/* 日志样式 */
.log-content {
    flex: 1;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    overflow-y: auto;
    max-height: 500px;
    line-height: 1.6;
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-info {
    color: #333;
}

.log-success {
    color: #4CAF50;
    font-weight: 600;
}

.log-error {
    color: #f44336;
    font-weight: 600;
}

/* 错误消息 */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

/* 状态栏 */
footer {
    margin-top: 20px;
}

.status-bar {
    background: white;
    padding: 12px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #555;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .config-section {
        flex: 1;
    }

    .logout-btn {
        position: static;
        display: block;
        margin-top: 15px;
        text-align: center;
    }

    .login-box {
        padding: 30px 20px;
    }
}

/* 滚动条样式 */
.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.log-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
