* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #eef2f5; color: #333; max-width: 950px; margin: 20px auto; padding: 15px; overflow-x: hidden; }

/* 헤더 타이틀 및 한글 소제목 전용 스타일 */
.header-title-box { text-align: center; margin-bottom: 25px; }
h1 { color: #1a73e8; margin: 0 0 8px 0; font-size: 26px; }
.title-mobile-break { display: inline; }
.header-subtitle { margin: 0; font-size: 14px; color: #5f6368; font-weight: 500; }

.search-box { background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.search-form { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="text"] { flex: 1; min-width: 200px; padding: 12px 16px; font-size: 16px; border: 1px solid #ddd; border-radius: 6px; outline: none; }

/* 기본 버튼 스타일 */
button { padding: 12px 20px; font-size: 16px; background: #1a73e8; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; white-space: nowrap; transition: background 0.2s; }
button:hover { background: #1558b0; }

/* 검사 진행 중(로딩) 상태 버튼 스타일 */
button.loading {
    background: #5f6368 !important;
    cursor: wait;
    opacity: 0.8;
}

.section-box { margin-top: 25px; background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); word-break: break-word; overflow-wrap: break-word; }
.section-box h3 { margin-top: 0; color: #222; border-bottom: 2px solid #f1f3f4; padding-bottom: 10px; font-size: 18px; }

/* 기본(데스크탑) 섹션 서브타이틀: 옆에 자연스럽게 배치 */
.sub-title { display: inline; font-size: 14px; color: #666; font-weight: normal; margin-left: 6px; }

/* 진단 리포트 리스트 스타일 */
.diagnostics ul { margin: 10px 0 0 0; padding-left: 0; list-style: none; color: #444; }
.diagnostics li { padding: 10px 0; border-bottom: 1px solid #f1f3f4; display: flex; flex-direction: column; gap: 8px; }
.diag-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.favicon-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; gap: 12px; }
.favicon-item img { width: 36px; height: 36px; object-fit: contain; background: #f1f3f4; padding: 4px; border: 1px solid #ddd; border-radius: 4px; flex-shrink: 0; }
.favicon-info { word-break: break-all; min-width: 0; flex: 1; }
.favicon-info a { color: #1a73e8; text-decoration: none; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 15px; }
.card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e1e4e8; }
.card-header { padding: 10px 14px; background: #f8f9fa; border-bottom: 1px solid #eee; font-weight: bold; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-header span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-img { width: 100%; height: 160px; object-fit: cover; background: #e9ecef; display: block; }
.card-img-placeholder { width: 100%; height: 140px; background: #e9ecef; display: flex; align-items: center; justify-content: center; color: #868e96; font-size: 13px; }
.card-content { padding: 12px 14px; }
.card-title { font-size: 14px; font-weight: bold; margin-bottom: 4px; color: #111; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 12px; color: #666; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-site { font-size: 11px; color: #888; text-transform: lowercase; }

.badge { display: inline-block; padding: 3px 8px; font-size: 11px; border-radius: 4px; font-weight: bold; flex-shrink: 0; white-space: nowrap; }
.badge-success { background: #e6f4ea; color: #137333; }
.badge-warning { background: #fef7e0; color: #b06000; }
.badge-danger { background: #fce8e6; color: #c5221f; }

.solution-btn {
    background: #f1f3f4;
    color: #1a73e8;
    border: 1px solid #dadce0;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.solution-btn:hover {
    background: #e8eaed;
}

.diag-solution-box {
    margin-top: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #1a73e8;
    border-radius: 4px;
    display: none;
}
.solution-content {
    font-size: 12px;
    color: #444;
    line-height: 1.6;
}
.solution-content code {
    background: #e9ecef;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    color: #d93025;
}
.solution-content pre {
    background: #202124;
    color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0 0 0;
    font-family: monospace;
    white-space: pre-wrap;
}

/* 구글 SEO 상세 표 카드 리스트 스타일 */
.seo-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}
.seo-card-item {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 14px;
}
.seo-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.seo-card-label {
    font-weight: bold;
    color: #1a73e8;
    font-size: 14px;
    word-break: break-all;
}
.seo-card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.seo-card-value {
    font-size: 13px;
    color: #333;
    word-break: break-all;
    line-height: 1.5;
}
.seo-card-value.empty {
    color: #aaa;
    font-style: italic;
}

/* 하단 라인 (진단 설명 + 해결방법 버튼 정렬) */
.seo-card-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e1e4e8;
}
.seo-card-diag {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    word-break: break-all;
    flex: 1;
}
.seo-card-diag code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    color: #d93025;
    font-size: 12px;
}

.seo-card-solution-box {
    margin-top: 10px;
    padding: 12px;
    background: #fff;
    border-left: 3px solid #1a73e8;
    border-radius: 4px;
    border-top: 1px solid #eee;
    display: none;
}

/* 푸터 전용 스타일 */
.site-footer {
    margin-top: 40px;
    padding: 25px 15px 10px 15px;
    text-align: center;
    font-size: 14px;
}
.footer-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #2e7d32;
    flex-wrap: wrap;
}
.footer-powered a {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.footer-powered a:hover {
    text-decoration: underline;
}
.globe-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.footer-copyright {
    color: #7f8c8d;
    font-size: 12px;
    font-weight: 500;
}

/* 모바일 화면(600px 이하) 전용 미디어쿼리 */
@media(max-width: 600px) {
    body { padding: 8px; margin: 5px auto; }
    h1 { font-size: 20px; line-height: 1.3; }
    .title-mobile-break { display: block; margin-top: 3px; }
    .header-subtitle { font-size: 13px; margin-top: 4px; }
    .section-box h3 { font-size: 16px; line-height: 1.4; }
    .sub-title { display: block; margin-left: 0; margin-top: 3px; font-size: 12px; }
    .search-box { padding: 15px; }
    button { width: 100%; }
    .section-box { padding: 15px; }
    
    /* 모바일에서는 하단 설명과 버튼을 세로로 배치하여 여유있게 표시 */
    .seo-card-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .solution-btn {
        width: 100% !important;
        text-align: center;
        padding: 8px;
    }
}