/* --- Global Styles --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #ff8597;
    color: white;
    margin: 0;
    padding: 0;
    padding-top: 100px;
}

/* --- Header & Navigation --- */
header {
    font-size: 24px;
    background-color: black;
    color: white;
    padding: 1%;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
    height: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
}

header nav { width: 100%; }

header nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

header nav ul li {
    display: inline-block;
    margin: 0 20px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: all 0.3s ease;
}

header nav ul li a:hover {
    background-color: white;
    color: #f20053;
    padding: 8px 12px;
    border-radius: 5px;
}

/* --- Search UI --- */
.search-li { margin-left: 20px; }

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

#csv-search {
    padding: 8px 15px;
    border-radius: 5px;
    border: 2px solid black;
    font-size: 14px;
    width: 200px;
    outline: none;
    background: white;
    color: black;
}

.search-results-dropdown {
    position: absolute;
    top: 60px;
    right: 0; 
    background: white;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    border: 4px solid black;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
    display: none;
    z-index: 1100;
}

.result-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 2px solid black;
    cursor: pointer;
    transition: background 0.2s ease;
    background: white;
}

.result-card:last-child { border-bottom: none; }

.result-card:hover { background: #ff8597; }

.result-card img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border: 2px solid black;
    margin-right: 15px;
    flex-shrink: 0;
}

.result-title {
    color: black;
    font-weight: 900;
    font-size: 14px;
    text-transform: uppercase;
    display: block;
    transition: color 0.2s ease;
}

.result-card:hover .result-title { color: #f20053; }

.search-loader {
    width: 30px;
    height: 30px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f20053;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Content & Layout --- */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1% 25%;
    padding: 1%;
    min-height: 80vh;
    color: black;
    box-sizing: border-box;
}

.linkhai {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.linkhai:hover { color: #f20053; font-size: 30px; }

footer {
    background-color: #111;
    color: white;
    text-align: center;
    padding: 2%;
    width: 100%;
}

/* --- Mobile Optimization --- */
@media (max-width: 768px) {
    body { padding-top: 140px; }
    header { height: auto; padding: 15px 10px; position: fixed; }
    header nav ul { flex-direction: column; gap: 10px; }
    .search-li { margin-left: 0; margin-top: 10px; width: 90%; }
    #csv-search { width: 100%; }
    .search-results-dropdown { width: 100%; top: 45px; }
}
