* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    position: relative;
    flex: 0 0 400px;
}

#searchInput {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    border-color: #4facfe;
    background: rgba(255, 255, 255, 0.15);
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#searchBtn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border: none;
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

#searchBtn:hover {
    transform: translateY(-50%) scale(1.05);
}

#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

#searchResults.active {
    display: block;
}

.search-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-item span:first-child {
    font-weight: 500;
}

.search-item span:last-child {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.market-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.login-btn {
    background: linear-gradient(135deg, #43a047, #2e7d32);
}

.login-btn:hover {
    box-shadow: 0 5px 20px rgba(67, 160, 71, 0.4);
}

.logout-btn {
    background: linear-gradient(135deg, #e53935, #c62828);
}

.logout-btn:hover {
    box-shadow: 0 5px 20px rgba(229, 57, 53, 0.4);
}

.user-name {
    color: #43a047;
    font-weight: 500;
    padding: 8px 15px;
    background: rgba(67, 160, 71, 0.1);
    border-radius: 20px;
    margin-right: 10px;
}

.status-label {
    color: rgba(255, 255, 255, 0.6);
}

.status-open {
    color: #43a047;
    font-weight: bold;
}

.status-closed {
    color: #e53935;
    font-weight: bold;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

section h2 {
    font-size: 18px;
}

.data-time-section {
    text-align: center;
    padding: 15px 20px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

.data-time {
    font-size: 16px;
    color: #007bff;
    font-weight: 500;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.plan-manager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.plan-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-select label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.plan-select select {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

.plan-select select option {
    background: #1a1a2e;
    color: #fff;
}

.plan-select select:focus {
    border-color: #4facfe;
}

.plan-save {
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-save input {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    outline: none;
    width: 150px;
}

.plan-save input:focus {
    border-color: #4facfe;
}

.plan-save input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-save {
    padding: 8px 20px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.btn-delete {
    padding: 8px 16px;
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid rgba(255, 71, 87, 0.5);
    border-radius: 8px;
    color: #ff4757;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: rgba(255, 71, 87, 0.3);
}

.tab-switch {
    display: flex;
    gap: 10px;
}

.tab-switch button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.tab-switch button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tab-switch button.tab-active {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    color: #fff;
}

.indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.index-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.index-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.index-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.index-price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.index-change {
    font-size: 14px;
    font-weight: 500;
}

.index-change.up {
    color: #e53935;
}

.index-change.down {
    color: #43a047;
}

.stocks-table-container {
    overflow-x: auto;
}

.stocks-table {
    width: 100%;
    border-collapse: collapse;
}

.stocks-table th,
.stocks-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stocks-table th {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 13px;
}

.stocks-table tr {
    transition: background 0.2s;
    cursor: pointer;
}

.stocks-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.stocks-table .stock-name {
    font-weight: 500;
}

.stocks-table .stock-code {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.stocks-table .price {
    font-weight: 600;
}

.stocks-table .change.up {
    color: #e53935;
}

.stocks-table .change.down {
    color: #43a047;
}

.cloud-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px;
}

.cloud-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #fff;
}

.cloud-tag:hover {
    transform: scale(1.05);
}

.cloud-tag.up {
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.3), rgba(229, 57, 53, 0.1));
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.cloud-tag.down {
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.3), rgba(67, 160, 71, 0.1));
    border: 1px solid rgba(67, 160, 71, 0.3);
}

.cloud-tag.neutral {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

footer p {
    margin-bottom: 5px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 15px;
    padding: 25px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
}

.close-modal {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
}

.stock-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
}

.detail-item label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 5px;
}

.detail-item value {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

.detail-item value.up {
    color: #e53935;
}

.detail-item value.down {
    color: #43a047;
}

.stock-filter {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    min-width: 100px;
}

.filter-group input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    width: 120px;
    font-size: 14px;
}

.filter-group input:focus {
    outline: none;
    border-color: #4facfe;
}

.filter-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.filter-group span {
    color: rgba(255, 255, 255, 0.5);
}

.filter-group .separator {
    color: rgba(255, 255, 255, 0.3);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: #4facfe;
}

.radio-label span {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 13px;
}

.ratio-desc {
    color: rgba(79, 172, 254, 0.8);
    font-size: 12px;
    margin-left: 10px;
}

.help-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: help;
    margin-left: 5px;
    transition: all 0.3s;
}

.help-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.6);
}

.help-tooltip {
    display: none;
    position: absolute;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 10px;
    padding: 15px;
    max-width: 350px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.help-tooltip.active {
    display: block;
}

.tooltip-title {
    font-weight: bold;
    color: #4facfe;
    margin-bottom: 12px;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-section {
    margin-bottom: 10px;
}

.tooltip-section:last-child {
    margin-bottom: 0;
}

.tooltip-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 5px;
}

.tooltip-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    padding: 3px 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.result-summary {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.1));
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #4facfe;
}

.empty-result {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
        flex: none;
    }
    
    .indices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stock-detail {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group input {
        width: 100%;
    }
}