/*
Theme Name: allinone
Version: 0.1.3
Author: kinghost
*/

:root {
    --primary-color: #0073aa;
    --bg-color: #f5f5f5;
    --text-color: #333;
    --header-bg: #fff;
    --card-bg: #fff;
    --border-color: #e5e5e5;
    --muted-color: #666;
    /* Customizer Variables Defaults */
    --menu-bg: #fff;
    --menu-text: #333;
}

/* 1. 深色模式 (Dark Mode) */
body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --header-bg: #2d2d2d;
    --card-bg: #2d2d2d;
    --border-color: #404040;
    --muted-color: #aaa;
    --menu-bg: #2d2d2d !important;
    --menu-text: #fff !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    transition: background 0.3s, color 0.3s;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header & Glassmorphism */
.site-header {
    background-color: var(--menu-bg);
    color: var(--menu-text);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    backdrop-filter: var(--menu-glass, none);
    background-color: rgba(255,255,255, var(--menu-opacity, 1));
}

body.dark-mode .site-header {
    background-color: rgba(45,45,45, var(--menu-opacity, 1));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* User Center */
.user-center-trigger {
    position: relative;
    padding: 5px 0;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-avatar img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    width: 260px;
    background: var(--card-bg);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 15px;
    z-index: 200;
    border: 1px solid var(--border-color);
}

.user-center-trigger:hover .user-dropdown {
    display: block;
}

.user-info-header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.user-stats {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    font-size: 0.9em;
    color: var(--muted-color);
}

.user-stats li {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.user-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.user-actions button, .user-actions .btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    text-decoration: none;
}

.user-actions .logout-link {
    background: transparent;
    color: var(--muted-color);
}

/* Slider */
.aio-slider {
    height: 400px;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}
.slide-item {
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    position: relative;
}
.slide-item::after {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.3);
}
.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.slide-content h2 { font-size: 2.5em; margin-bottom: 20px; }
.slide-content .btn {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    display: inline-block;
}

/* Paywall */
.aio-paywall-box {
    background: #fff3cd;
    color: #856404;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    margin: 30px 0;
    border: 1px solid #ffeeba;
}
body.dark-mode .aio-paywall-box {
    background: #3a3212;
    color: #fdf2ce;
    border-color: #5a4b18;
}

/* =========================================
   Admin Settings Styles (后台样式优化)
   ========================================= */
.aio-settings-wrap .aio-container {
    display: flex;
    background: #fff;
    margin-top: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.aio-tab-nav {
    width: 200px;
    background: #f9f9f9;
    margin: 0;
    padding: 0;
    border-right: 1px solid #ccd0d4;
    flex-shrink: 0;
}

.aio-tab-nav li {
    padding: 15px 20px;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.aio-tab-nav li:hover {
    background: #f1f1f1;
    color: #0073aa;
}

.aio-tab-nav li.active {
    background: #fff;
    color: #0073aa;
    border-left: 3px solid #0073aa;
    margin-left: -1px;
}

.aio-content-area {
    flex: 1;
    padding: 20px 30px;
    overflow: hidden;
}

.aio-tab-content {
    display: none;
}

.aio-tab-content.active {
    display: block;
}

/* 横向开关组容器 */
.aio-switch-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

/* Checkbox Style (New) */
.aio-switch-row {
    display: inline-flex;
    align-items: center;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
    width: calc(50% - 10px); /* 一行两个 */
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s;
}

.aio-switch-row:hover {
    background: #fff;
    border-color: #0073aa;
}

.aio-switch-row label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.aio-switch-row input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

@media(max-width: 1400px) {
    .aio-switch-row { width: 100%; }
}

.aio-switch-label {
    font-weight: 500;
    color: #333;
}