body {
    padding: 0;
    margin: 0;
}

.detail-container {
    display: flex;
    height: 100vh;
    background: #f4f7f6;
}

/* 左侧题材列表 */
.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 0;
}

.theme-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    transition: all 0.3s;
    color: #666;
}

.theme-item:hover {
    background: #f0f7ff;
}

.theme-item.active {
    background: #e6f7ff;
    color: #aa0101;
    font-weight: bold;
    border-right: 3px solid #aa0101;
}

/* 右侧股票内容 */
.main-content {
    flex: 1;
    overflow-y: auto;
}

.stock-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    padding: 30px;
}

.stock-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.stock-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.stock-code {
    color: #999;
    font-size: 12px;
    margin-bottom: 10px;
    cursor: pointer;
}

.stock-reason {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    border-top: 1px dashed #eee;
    pt: 8px;
}

.increase-limit {
    font-size: 14px;
    color: red;
}

.layout-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.sticky-theme {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 20px;
}

.search-toggle-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ea0707, #880202);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    color: white;
    font-size: 24px;
}

.search-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #880202, #1a252f);
}

.search-toggle-btn i {
    transition: transform 0.3s ease;
}

.search-toggle-btn:hover i {
    transform: rotate(15deg);
}

.search-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-panel.active {
    right: 0;
}

.close-search {
    background: none;
    border: none;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-search:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-container {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

.search-input-group {
    position: relative;
    margin-bottom: 30px;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #aa0101;
    border-right: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.search-input-group button {
    background: #aa0101;
    color: white;
    border: 2px solid #aa0101;
    border-left: none;
    border-radius: 0 5px 5px 0;
    padding: 0 20px;
    cursor: pointer;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.2rem;
}

.search-results {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-panel {
        width: 100%;
        right: -100%;
    }

    .search-toggle-btn {
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}