:root {
    --bg-color: #ffffff;
    --text-primary: #000000;
    --border-color: #d0d7e5;
    --header-bg: #f3f3f3;
    --header-text: #333333;
    --row-hover: #e8f0fe;
    --link-color: #0563c1;
    --rank-color: #e02d1b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    font-size: 13px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    padding: 20px;
}

.table-container {
    overflow-x: auto;
    border: 1px solid #777;
    /* Outer border like Excel window */
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    min-width: 1000px;
}

th,
td {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 24px;
    /* Excel default row height approx */
}

th {
    background-color: var(--header-bg);
    color: var(--header-text);
    font-weight: normal;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #b5b5b5;
    /* Slightly thicker header bottom */
}

/* Rank Column - Centered */
td.rank {
    text-align: center;
    background-color: #f3f3f3;
    /* Excel row header style */
    width: 40px;
    font-weight: bold;
}

/* Title Column */
td.title {
    max-width: 400px;
}

/* Score Column - Right aligned or Center */
td.score {
    text-align: center;
    width: 60px;
}

/* Keywords Column */
td.keywords {
    max-width: 150px;
    color: #555;
    text-align: center;
}

/* Source Column */
td.source {
    text-align: center;
    width: 80px;
}

td.source span {
    font-weight: bold;
}

.source-youtube {
    color: #ff0000;
}

.source-news {
    color: #1a0dab;
}

/* Links Column */
td.links {
    text-align: left;
    max-width: 300px;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Date Column */
td.date {
    text-align: center;
    width: 100px;
    color: #333;
}

/* Row Hover Effect */
tr:hover td {
    background-color: var(--row-hover);
    cursor: default;
}

/* Scrollbar to look more native/clean */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border: 3px solid #f1f1f1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Landing Overlay */
#landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.landing-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.landing-content h1 {
    font-size: 28px;
    margin-bottom: 40px;
    color: #333;
    font-weight: 800;
}

.selection-group {
    margin-bottom: 30px;
    text-align: left;
}

.selection-group h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.select-btn {
    padding: 10px 20px;
    font-size: 15px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
}

.select-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.select-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

.action-group {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.action-group h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}

#search-btn {
    padding: 15px 50px;
    font-size: 18px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
}

#search-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(40, 167, 69, 0.3);
}

#search-btn:active {
    transform: translateY(0);
}

/* Hide Enter Button styles as it is replaced */
#enter-btn {
    display: none;
}