html, body {
    height: 100%;
    margin: 0;
    background-color: #1e1e2e;
    color: white;

    display: flex;
    flex-direction: column;
}

.homepage-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #a6adc8;
}

.homepage-footer a {
    color: #89b4fa;
    text-decoration: none;
}

.homepage-footer a:hover {
    text-decoration: underline;
}

.homepage-footer span {
    color: #cdd6f4;
    font-weight: 600;
}

.homepage-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.search-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.search-input {
    width: 100%;
    max-width: 700px;
    padding: 12px 20px;
    font-size: 18px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #505050;
    color: #fff;
    box-sizing: border-box;
}

.homepage-wrapper {
    width: 95%;
    max-width: 700px;
    margin: 0 auto;
}

.top-bar {
    padding: 1rem 0 0.5rem 0;
    background-color: #1e1e2e;
    border-bottom: 1px solid #313244;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.search-categories {
    max-width: 700px;
    width: 95%;
    margin: 0.5rem auto 0 auto;
    display: flex;
    gap: 1.5rem;
}

.search-categories .category {
    padding: 0.4rem 0;
    color: #a6adc8;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.search-categories .category:hover {
    color: #cdd6f4;
}

.search-categories .category.active {
    color: #b4befe;
    border-bottom-color: #b4befe;
    font-weight: 600;
}

.search-bar-container,
.results-container {
    max-width: 700px;
    width: 95%;
    margin: 0 auto;
}

.search-bar {
    width: 100%; 
    padding: 12px 20px;
    font-size: 18px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #505050;
    color: #fff;
    box-sizing: border-box; 
}

.results-container {
    display: flex;
    padding-top: 125px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #cdd6f4;
    font-family: 'Inter', sans-serif;
}

.result, .result-skeleton {
    background-color: #313244; 
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.result:hover {
    background-color: #45475a;
    box-shadow: 0 6px 12px rgba(0,0,0,0.6);
}

.result .url_header {
    display: block;
    color: #f5c2e7; 
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    text-decoration: none;
    word-break: break-all;
}

.result .name {
    color: #b4befe;
}

.url_header:visited,
.name:visited {
    color: #7f849c;
}

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

.result .description {
    font-size: 0.95rem;
    color: #bac2de;
    line-height: 1.4;
    margin: 0.5rem 0;
}

.result .engines {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #94e2d5;
    display: flex;
    gap: 0.5rem;
}

.engine-tag {
    display: inline-block;
    padding: 3px 6px;
    margin-right: 4px;
    border-radius: 4px;
    font-size: 0.8em;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: auto;
  gap: 1rem;
}

.image-result {
  display: flex;
  flex-direction: column;
}

.image-result img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.caption {
  margin-top: 0.5rem;
}

.image-result .image-title {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #ddd;
    line-height: 1.2rem;
    min-height: 2.4rem;
}

.image-thumb {
  width: 100%;
  border-radius: 6px;
  display: block;
}

figcaption {
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    display: inline-block;
    animation: shimmer 1.2s infinite;
}

.skeleton-url { height: 12px; width: 60%; margin-bottom: 0.5rem; }
.skeleton-title { height: 18px; width: 80%; margin-bottom: 0.5rem; }
.skeleton-description { height: 10px; width: 100%; margin-bottom: 0.25rem; }
.skeleton-engine { height: 10px; width: 20%; margin-right: 0.25rem; }

