/* advanced_search.css */
@import url('stock.css');

.ranking-block {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    padding: 24px 20px 20px 20px;
}
.ranking-block h2 {
    font-size: 26px;
    color: #0056b3;
    margin-bottom: 18px;
    text-align: center;
}
.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 18px;
}
.controls label {
    font-weight: bold;
    margin-right: 6px;
    margin-left: 8px;
}
.controls select {
    min-width: 90px;
    max-width: 140px;
    margin-right: 12px;
}
.controls select, .controls button {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 16px;
}
.controls button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.controls button:hover {
    background-color: #0056b3;
}
.result-list {
    margin-top: 10px;
    margin-bottom: 10px;
}
.result-item {
    display: flex;
    gap: 0;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
    transition: background 0.15s;
}
.result-item:hover {
    background: #f5f8fa;
}
.result-item span {
    margin-right: 18px;
    font-size: 15px;
    color: #333;
}
.result-item .company-link {
    color: #0056b3;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-size: 17px;
}
.result-item .company-link:hover {
    color: #003366;
}
.result-item .stock-symbol {
    color: #60748a;
    font-weight: 500;
    font-size: 15px;
}
.result-item .sector {
    color: #4e5e70;
    font-size: 15px;
}
.result-item .metric {
    color: #0056b3;
    font-size: 15px;
    font-weight: 600;
}
.result-item .value {
    color: #d2691e;
    font-size: 15px;
    font-weight: 600;
}
.result-item .year, .result-item .quarter {
    color: #60748a;
    font-size: 15px;
}
.result-item .quarter {
    color: #60748a;
    font-size: 15px;
    font-weight: 700;
    background: #f3f6fa;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 2px;
}
.result-item .rank {
    color: #e67e22;
    font-size: 15px;
    font-weight: 600;
}
.result-item span:not(:last-child) {
    margin-right: 18px;
    border-right: 1px solid #e0e0e0;
    padding-right: 14px;
}
.no-result {
    color: #dc3545;
    text-align: center;
    padding: 12px;
}
button[id$='next-page'] {
    display: block;
    margin: 0 auto;
    margin-top: 10px;
    padding: 10px 30px;
    font-size: 16px;
    border-radius: 6px;
    background: #e0e4e8;
    color: #0056b3;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
button[id$='next-page']:hover {
    background: #0056b3;
    color: #fff;
}
.paging-btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 10px 0 10px 0;
}
.paging-btn-group button {
    min-width: 120px;
    height: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 6px;
    background: #e0e4e8;
    color: #0056b3;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.paging-btn-group button:hover {
    background: #0056b3;
    color: #fff;
} 

/* ========== 補充 header、漢堡選單、nav-dropdown 及 RWD 樣式 ========== */
@media (max-width: 768px) {
    .main-header {
        padding: 12px 20px;
    }
    .header-left-section {
        gap: 16px;
    }
    .nav-links {
        display: none;
    }
    .header-right-section {
        gap: 16px;
    }
    .user-page-button {
        display: none;
    }
    .profile-image {
        width: 32px;
        height: 32px;
    }
    .hamburger-menu {
        display: flex;
    }
    .nav-dropdown {
        padding-top: 60px;
    }
    .nav-dropdown.active {
        display: flex;
    }
    .nav-dropdown a {
        width: 100%; 
        justify-content: flex-start;
        padding: 15px 20px;
    }
    .hamburger-menu-close {
        display: block;
    }
    .content-area {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
    .ranking-block h2 {
        font-size: 20px;
    }
}
@media (max-width: 480px) {
    .main-header {
        padding: 10px;
    }
    .nav-dropdown {
        padding-top: 50px;
    }
    .nav-dropdown a {
        padding: 10px 15px;
        font-size: 15px;
    }
    .hamburger-menu-close {
        top: 15px;
        right: 15px;
    }
} 

@media (max-width: 900px) {
    .content-area {
        padding: 8px;
    }
    .container {
        padding: 8px;
    }
    .result-list {
        padding: 0 2px;
        overflow-x: auto;
    }
    .result-item {
        flex-direction: column;
        align-items: center;
        font-size: 13px;
        padding: 6px 0;
        text-align: center;
        justify-content: center;
        gap: 2px;
    }
    .result-item span {
        font-size: 12px;
        margin-right: 4px;
        padding-right: 2px;
        border-right: none;
        text-align: center;
        display: block;
        width: 100%;
    }
    .result-item .company-link {
        font-size: 14px;
        text-align: center;
        width: 100%;
    }
}
@media (max-width: 600px) {
    .content-area {
        padding: 2px;
    }
    .container {
        padding: 2px;
        min-width: 400px;
    }
    .controls {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }
    .controls-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 100%;
    }
    .controls-row label,
    .controls-row select {
        display: inline-flex;
        text-align: left;
        margin: 0;
        width: auto;
    }
    .controls label,
    .controls select,
    .controls button {
        text-align: center;
        display: block;
        margin: 0 5px;
    }
    .result-item span:not(:last-child) {
        margin-right: 0px;
        border-right: 0px solid #e0e0e0;
        padding-right: 0px;
    }
} 