:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --text: #1e293b;
}

body { font-family: 'Pretendard', sans-serif; background: var(--bg); color: var(--text); margin: 0; }

header { background: white; padding: 40px 20px; text-align: center; border-bottom: 1px solid #e2e8f0; }
.search-bar-row { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
input[type="date"] { padding: 10px; border-radius: 8px; border: 1px solid #e2e8f0; }
.input-group { display: flex; gap: 5px; }
input[type="text"] { width: 350px; padding: 12px 20px; border-radius: 30px; border: 1px solid #e2e8f0; }
button#searchBtn { background: var(--primary); color: white; border: none; padding: 12px 25px; border-radius: 30px; cursor: pointer; }

.tabs { display: flex; justify-content: center; gap: 10px; margin: 20px 0; }
.tab-btn { background: white; border: 1px solid #e2e8f0; padding: 10px 20px; border-radius: 20px; cursor: pointer; }
.tab-btn.active { background: var(--primary); color: white; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; max-width: 1200px; margin: 0 auto; padding: 20px; }
.card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); cursor: pointer; }
.card img { width: 100%; height: 180px; object-fit: cover; }
.card-info { padding: 15px; }

/* Modal & Study UI */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; backdrop-filter: blur(5px); }
.modal-content { background: white; margin: 5% auto; width: 90%; max-width: 700px; border-radius: 20px; padding: 30px; position: relative; }
.level-selector { display: flex; gap: 10px; margin: 20px 0; }
.level-btn { flex: 1; padding: 10px; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; background: #f1f5f9; }
.level-btn.active { background: #dbeafe; color: var(--primary); }

.english-box { 
    background: #f8fafc; padding: 25px; border-radius: 15px; cursor: pointer; 
    border: 2px solid transparent; transition: 0.2s; 
}
.english-box:hover { border-color: var(--primary); background: #f0f7ff; }
.en-text { font-size: 1.2rem; line-height: 1.7; margin: 0; color: #0f172a; }
.ko-text { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #cbd5e1; color: #64748b; font-size: 1.05rem; }
.hint-badge { display: inline-block; margin-top: 15px; font-size: 0.8rem; color: var(--primary); font-weight: bold; }

.origin-link { display: block; text-align: center; margin-top: 20px; padding: 15px; background: #1e293b; color: white; text-decoration: none; border-radius: 10px; }
.close { position: absolute; right: 25px; top: 20px; font-size: 30px; cursor: pointer; }
.no-image {
    width: 100%;
    height: 180px;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.2rem;
    font-weight: bold;
}
/* 유사도 뱃지 스타일 */
.card {
    position: relative; /* 뱃지 배치를 위해 필요 */
}
.similarity-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(59, 130, 246, 0.9); /* 파란색 배경 */
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
