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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fafafa;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-image, none) center/cover no-repeat;
    z-index: -1;
    filter: brightness(0.8);
}

#app {
    display: flex;
    flex-direction: row-reverse;
    height: 100vh;
    position: relative;
}

.toggle-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
}

.toggle-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 0;
    opacity: 0;
    border: none;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header span {
    font-weight: 500;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.link-category {
    margin-bottom: 16px;
}

.category-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    padding: 0 12px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.link-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0 12px;
}

.link-list li a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: background 0.2s;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 12px;
}

.link-list li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.link-name {
    font-size: 12px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    height: 100vh;
    overflow: hidden;
}

.top-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    padding: 16px 24px;
    padding-right: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: right 0.3s ease;
    z-index: 10;
}

.datetime {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.time {
    font-size: 28px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Search */
.search-container {
    width: 100%;
    max-width: 580px;
}

.search-engine-switch {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.search-engine-switch button {
    padding: 8px 20px;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.search-engine-switch button.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-color: transparent;
}

.search-form {
    display: flex;
    gap: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-form input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: #fff;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-form button {
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.search-form button:hover {
    background: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        z-index: 100;
        height: 100vh;
        right: 0;
        width: 260px;
    }

    .sidebar.collapsed {
        width: 0;
        border: none;
    }

    .top-bar {
        padding-right: 80px;
    }
}
