:root {
    --sidebar-bg: #2c2e2f;
    --sidebar-text: #979898;
    --sidebar-active-text: #ffffff;
    --sidebar-active-bg: #242628;
    --main-bg: #f9f9f9;
    --nav-bg: #ffffff;
    --text-color: #333333;
    --text-gray: #888888;
    --card-bg: #ffffff;
    --card-border: #eeeeee;
    --card-hover-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    --primary-color: #007daa;
}

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

html {
    scroll-behavior: smooth;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--main-bg);
}

body {
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Sidebar */
.sidebar-menu {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: #242628;
}

.sidebar-header .logo {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
}

.sidebar-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-inner::-webkit-scrollbar {
    width: 4px;
}
.sidebar-inner::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.main-menu {
    list-style: none;
}

.main-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--sidebar-text);
    transition: all 0.2s;
    font-size: 14px;
}

.main-menu li a i {
    width: 24px;
    font-size: 16px;
    text-align: center;
    margin-right: 10px;
}

.main-menu li a:hover, .main-menu li.active a {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active-bg);
}

.submit-tag {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 10px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: all 0.3s ease;
}

/* Top Navbar */
.navbar {
    height: 70px;
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 900;
}

.user-info-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info-menu a {
    color: var(--text-gray);
    font-size: 16px;
    transition: color 0.2s;
}

.user-info-menu a:hover {
    color: var(--primary-color);
}

.ios-clock-widget {
    display: flex;
    align-items: center;
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 8px 18px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.8);
    gap: 14px;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.ios-clock-widget:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.ios-time {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
    color: #1d1d1f;
}

.ios-date-group {
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    padding-left: 14px;
    justify-content: center;
}

.ios-date {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1d1d1f;
}

.ios-lunar {
    font-size: 11px;
    color: #86868b;
    margin-top: 2px;
    font-weight: 500;
}

.ios-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ios-badge.work {
    background: #ff3b30;
    color: #fff;
}

.ios-badge.rest {
    background: #34c759;
    color: #fff;
}

/* Search Area */
.search-area {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.search-type {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-type li {
    position: relative;
}

.search-type input[type="radio"] {
    display: none;
}

.search-type label {
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.search-type input[type="radio"]:checked + label {
    background: #e0e0e0;
    font-weight: bold;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    padding: 0 25px;
    font-size: 18px;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.2s;
}

.search-box button:hover {
    color: var(--primary-color);
}

/* Sites Area */
.sites-area {
    padding: 0 30px 40px;
    flex: 1;
}

.sites-area h4 {
    font-size: 18px;
    margin: 30px 0 20px;
    font-weight: normal;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sites-area h4 i {
    color: var(--primary-color);
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.xe-widget {
    display: block;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.xe-widget:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

.xe-comment-entry {
    display: flex;
    align-items: center;
    gap: 15px;
}

.xe-user-img img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.text-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #666;
}

.xe-comment {
    flex: 1;
    min-width: 0;
}

.xe-user-name strong {
    font-size: 15px;
    color: var(--text-color);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overflowClip_1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* Footer */
.main-footer {
    background: #fff;
    padding: 20px 30px;
    border-top: 1px solid var(--card-border);
    color: var(--text-gray);
    font-size: 14px;
    text-align: center;
}

.main-footer a {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-menu {
        transform: translateX(-100%);
    }
    
    .sidebar-menu.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .navbar .left-links .hidden-xs {
        display: block;
    }
    
    .search-box {
        max-width: 100%;
    }

    .navbar {
        height: auto;
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ios-clock-widget {
        width: 100%;
        justify-content: space-between;
    }
    
    .row {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}
