.serp-header {
  border-bottom: 1px solid #ebebeb;
  padding: 20px 20px 0 20px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

:root[data-theme="dark"] .serp-header,
:root[data-theme="dark"] .serp-search-box,
:root[data-theme="dark"] .favicon,
:root[data-theme="dark"] .paa-box,
:root[data-theme="dark"] .knowledge-panel {
  background: var(--bg-secondary);
}

:root[data-theme="dark"] .serp-header,
:root[data-theme="dark"] .serp-search-box,
:root[data-theme="dark"] .paa-box,
:root[data-theme="dark"] .paa-item,
:root[data-theme="dark"] .paa-title,
:root[data-theme="dark"] .kp-header,
:root[data-theme="dark"] .kp-profiles-section,
:root[data-theme="dark"] .profile-link {
  border-color: var(--border-color);
}

:root[data-theme="dark"] .serp-search-box input,
:root[data-theme="dark"] .source-name,
:root[data-theme="dark"] .paa-title,
:root[data-theme="dark"] .paa-question,
:root[data-theme="dark"] .kp-titles h2,
:root[data-theme="dark"] .kp-desc,
:root[data-theme="dark"] .kp-fact,
:root[data-theme="dark"] .profile-link {
  color: var(--text-main);
}

:root[data-theme="dark"] .serp-search-box {
  background-color: #303134;
  border-color: #5f6368;
}

:root[data-theme="dark"] .serp-search-box input {
  background-color: #303134;
}

:root[data-theme="dark"] .result-stats,
:root[data-theme="dark"] .source-url,
:root[data-theme="dark"] .result-snippet,
:root[data-theme="dark"] .paa-answer,
:root[data-theme="dark"] .kp-subtitle {
  color: var(--text-muted);
}

:root[data-theme="dark"] .read-more,
:root[data-theme="dark"] .result-title {
  color: var(--link-color);
}

.header-top {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-left: 10px;
}

.serp-logo {
  height: 30px;
  margin-right: 35px;
}

.serp-search-box {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 690px;
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 10px 20px;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.serp-search-box input {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  color: #202124;
}

.search-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #70757a;
}

.icon {
  width: 24px;
  height: 24px;
}

.serp-tabs {
  display: flex;
  gap: 20px;
  margin-left: 165px;
  font-size: 14px;
  color: #5f6368;
}

.tab {
  padding-bottom: 10px;
  cursor: pointer;
}

.tab.active {
  color: #1a73e8;
  border-bottom: 3px solid #1a73e8;
}

.serp-main {
  display: flex;
  max-width: 1300px;
  margin: 0;
  padding: 20px 20px 20px 165px;
  gap: 60px;
}

.serp-left {
  width: 100%;
  max-width: 652px;
}

.serp-right {
  width: 100%;
  max-width: 380px;
}

.result-stats {
  color: #70757a;
  font-size: 14px;
  margin-bottom: 24px;
}

.search-result {
  margin-bottom: 28px;
  padding: 0;
}

.favicon {
  width: 26px;
  height: 26px;
  background: #f1f3f4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ededed;
  padding: 0;
}

:root[data-theme="dark"] .favicon {
  background-color: #303134;
  border-color: #3c4043;
}

.favicon svg {
  width: 16px;
  height: 16px;
}

:root[data-theme="dark"] .favicon svg {
  fill: #e8eaed;
}

.result-source {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.source-text {
  display: flex;
  flex-direction: column;
}

.source-name {
  color: #202124;
  font-size: 14px;
  line-height: 20px;
}

.source-url {
  color: #4d5156;
  font-size: 12px;
  line-height: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-tag {
  font-size: 10px;
  font-weight: 700;
  color: #5f6368;
  background-color: #f1f3f4;
  border-radius: 12px;
  padding: 2px 6px;
  line-height: 14px;
}

:root[data-theme="dark"] .pdf-tag {
  background-color: #3c4043;
  color: #ffffff;
}

.snippet-date {
  color: #70757a;
}

.read-more,
.result-snippet a {
  color: #1a0dab;
  text-decoration: none;
  padding: 0;
  margin: 0;
  line-height: inherit;
  display: inline;
}

.read-more:hover {
  text-decoration: underline;
}

.arrow-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.result-title {
  color: #1a0dab;
  font-size: 20px;
  text-decoration: none;
  display: inline-block;
  margin: 4px 0 2px 0;
  line-height: 1.3;
  padding: 0;
  min-height: auto;
  word-break: break-word;
}

.result-title:hover {
  text-decoration: underline;
}

.result-snippet {
  color: #4d5156;
  font-size: 14px;
  line-height: 1.58;
  margin-top: 0;
  padding: 0;
  word-break: break-word;
}

.paa-box {
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  margin-bottom: 30px;
}

.paa-title {
  font-size: 20px;
  color: #202124;
  padding: 15px 20px;
  border-bottom: 1px solid #dfe1e5;
}

.paa-item {
  border-bottom: 1px solid #dfe1e5;
}

.paa-item:last-child {
  border-bottom: none;
}

.paa-question {
  padding: 15px 20px;
  font-size: 16px;
  color: #202124;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.paa-question:hover {
  background-color: #f8f9fa;
}

:root[data-theme="dark"] .paa-question:hover {
  background-color: #303134;
}

.paa-answer {
  padding: 0 20px 15px 20px;
  font-size: 14px;
  color: #4d5156;
  line-height: 1.6;
  display: none;
}

.knowledge-panel {
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  padding: 20px;
}

.kp-header {
  border-bottom: 1px solid #dfe1e5;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.kp-titles h2 {
  font-size: 30px;
  color: #202124;
  font-weight: normal;
  margin-top: 0;
  margin-bottom: 2px;
}

.kp-subtitle {
  color: #70757a;
  font-size: 14px;
}

.kp-desc {
  font-size: 14px;
  color: #202124;
  line-height: 1.6;
  margin-bottom: 15px;
}

.kp-fact {
  font-size: 14px;
  color: #202124;
  margin-bottom: 10px;
}

.fact-label {
  font-weight: bold;
}

.kp-profiles-section {
  margin-top: 20px;
  border-top: 1px solid #dfe1e5;
  padding-top: 15px;
}

.kp-profiles {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.profile-link {
  display: block;
  padding: 8px 12px;
  border: 1px solid #dfe1e5;
  border-radius: 16px;
  text-decoration: none;
  color: #202124;
  font-size: 14px;
}

.profile-link:hover {
  background: #f8f9fa;
}

:root[data-theme="dark"] .profile-link:hover {
  background-color: #3c4043;
}

@media (max-width: 900px) {
  .serp-header {
    padding: 15px 15px 0 15px;
  }

  .serp-main {
    flex-direction: column;
    padding: 20px 15px;
    gap: 30px;
  }

  .serp-tabs {
    margin-left: 0;
    overflow-x: auto;
    gap: 15px;
  }

  .header-top {
    padding-left: 0;
    gap: 12px;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
  }

  .serp-logo {
    margin-right: 0;
    height: 24px;
    flex-shrink: 0;
  }

  .serp-search-box {
    padding: 8px 15px;
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .result-title,
  .read-more {
    padding: 8px 0;
  }
}
