/* 全局样式 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 后台头部样式 */
.header {
    padding: 1rem 0;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header .container-fluid {
    padding: 0 1rem;
}

/* 后台主容器 */
.main-container {
    flex: 1;
    display: flex;
    width: 100%;
    overflow: hidden;
}

.row {
    flex: 1;
    display: flex;
    margin: 0;
    width: 100%;
}

/* 后台侧边栏样式 */
.sidebar {
    background-color: #2d3748;
    color: #fff;
    height: 100%;
    min-height: 100%;
    padding: 1rem 0;
    border-right: 1px solid #4a5568;
    width: 240px;
    flex-shrink: 0;
    overflow-y: auto;
    position: relative;
}

.col-md-10 {
    flex: 1;
    height: 100%;
    overflow-y: auto;
}

.sidebar a {
    color: #e2e8f0;
    text-decoration: none;
    display: block;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    text-align: left;
    padding-left: 3.5rem;
}

.sidebar a i {
    display: inline-block;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.sidebar a span {
    display: inline-block;
    font-size: 1rem;
}

.sidebar a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #4299e1;
}

.sidebar .nav-title {
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #a0aec0;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.sidebar a.active {
    color: #fff;
    background-color: rgba(66, 153, 225, 0.1);
    border-left-color: #4299e1;
    font-weight: 500;
}

/* 侧边栏版本信息 */
.sidebar-version {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.update-icon {
    margin-top: 5px;
    text-align: center;
}

.update-icon span {
    margin-left: 10px;
}

.update-icon a {
    color: #ffc107;
    text-decoration: none;
    padding: 0 !important;
    margin-left: 70px;
}

.sidebar-version .update-icon a:hover {
    color: #ffca2c;
    background-color: transparent !important;
    border-left-color: transparent !important;
}

/* 后台内容区域 */
.content {
    padding: 2rem;
}

.card {
    margin-bottom: 1.5rem;
}

/* 设置页面样式 */
.setting-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.setting-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.setting-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.setting-description {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1.5rem;
}

/* 首页样式 */
body.home {
    background-image: url('/assets/images/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 全局页脚样式 */
.footer {
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #9aa0a6;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer p {
    margin: 0;
}



.header {
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #495057;
}

.header a {
    color: #495057;
}

.header a:hover {
    color: #212529;
}

.header .btn {
    border-color: #0d6efd;
    color: #495057;
}

.header .btn:hover {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: #0a58ca;
    color: #212529;
}

.hero {
    padding: 4rem 0;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    color: #495057;
}

.link-card h2, .link-card .form-label {
    text-shadow: none;
}

.link-card input {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #495057;
}

.link-card input::placeholder {
    color: #6c757d;
}

.link-card .result {
    background-color: rgba(255, 255, 255, 0.8);
}

.link-card .alert {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #495057;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 0.375rem;
    color: #495057;
}

.quota-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #495057;
}

.footer {
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #9aa0a6;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer p {
    margin: 0;
}

/* 安装页面样式 */
body.install-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
    background-attachment: fixed;
    overflow-y: auto;
}

.install-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out;
}

.install-header {
    text-align: center;
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.install-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.install-header h1 {
    color: #4a5568;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.install-header p {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

.install-body {
    padding: 30px;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step-indicator > div {
    flex: 1;
    text-align: center;
    position: relative;
}

.step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active {
    background-color: #667eea;
    color: white;
}

.step-text {
    font-size: 14px;
    color: #718096;
}

.info-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.info-box h5 {
    color: #4a5568;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
    color: #4a5568;
}

.btn-install {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.form-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.alert {
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-heading {
    font-weight: 600;
    margin-bottom: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .install-card {
        margin: 20px;
        padding: 0;
    }
    
    .install-header {
        padding: 20px;
    }
    
    .install-body {
        padding: 20px;
    }
    
    .step-indicator {
        flex-direction: column;
        align-items: center;
    }
    
    .step-indicator > div {
        margin-bottom: 15px;
    }


/* 升级页面样式 */
body.upgrade {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f5f5f5;
}

body.upgrade .container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body.upgrade h1 {
    color: #333;
    text-align: center;
}

body.upgrade .success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

body.upgrade .error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

body.upgrade .info {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #bee5eb;
}

body.upgrade pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
}

body.upgrade .btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
}

body.upgrade .btn:hover {
    background-color: #0056b3;
}





/* 登录和注册页面样式 */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-actions {
    margin-top: 2rem;
}

.form-actions button {
    width: 100%;
    padding: 0.75rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.form-actions button:hover {
    background-color: #0069d9;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.form-footer a {
    color: #007bff;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 个人资料页面样式 */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.profile-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.profile-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.profile-info {
    margin-bottom: 1.5rem;
}

.profile-info p {
    margin: 0.5rem 0;
    color: #333;
}

.profile-info .label {
    font-weight: bold;
    color: #666;
}

/* 错误页面样式 */
.error-container {
    max-width: 500px;
    padding: 3rem;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    text-align: center;
    color: #495057;
}

.error-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1.5rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.error-message:last-child {
    margin-bottom: 2rem;
}

.btn-back {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    margin-top: 1rem;
}

.btn-back:hover {
    background-color: #0a58ca;
    border-color: #0a58ca;
}

/* 关于页面样式 */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.about-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.about-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.about-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-section p {
    margin: 0.5rem 0;
    color: #333;
    line-height: 1.6;
}

.about-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.about-section li {
    margin: 0.5rem 0;
    color: #333;
}

/* 分析页面样式 */
.analytics-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.analytics-header {
    text-align: center;
    margin-bottom: 2rem;
}

.analytics-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.analytics-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.analytics-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.analytics-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-card {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.stat-card h4 {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-card p {
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}
