/* ============ Reset & Base ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  min-height: 100vh;
  overflow: hidden;
  line-height: 1.6;
  color: white;
}

/* ============ Background ============ */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-image: url('https://images.unsplash.com/photo-1531366936336-62fc674cb3ba?auto=format&fit=crop&w=2560&q=80');
  background-color: #1a2a3a;
}

/* ============ Layout Container ============ */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 6vh;
  position: relative;
  z-index: 10;
}

/* ============ Clock & Date ============ */
.header-section {
  text-align: center;
}

.time-display {
  font-size: 80px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.date-display {
  font-size: 16px;
  font-weight: 400;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

/* ============ Greeting & Weather ============ */
.greeting-section {
  text-align: center;
  margin-top: 24px;
}

.greeting {
  font-size: 32px;
  font-weight: 400;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
}

.weather-container {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.weather-text {
  font-size: 14px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.weather-icon-temp {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============ Search ============ */
.search-container {
  margin-top: 24px;
  width: 100%;
  max-width: 500px;
  position: relative;
}

.search-box {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  padding: 0 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-box:hover, .search-box:focus-within {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.engine-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  margin-right: 12px;
  transition: all 0.2s;
  position: relative;
  user-select: none;
  font-weight: 600;
  color: #333;
}

.engine-selector:hover {
  background: rgba(255, 255, 255, 0.8);
}

.engine-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  min-width: 120px;
  z-index: 100;
}

.engine-option {
  padding: 10px 16px;
  font-size: 14px;
  color: #333;
  transition: background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.engine-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

.engine-option.active {
  font-weight: bold;
  background: rgba(0, 0, 0, 0.03);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #333;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
}

.search-box input::placeholder {
  color: transparent;
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.search-result-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.result-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.result-name {
  font-size: 14px;
  font-weight: 500;
}

/* ============ Sites Grid ============ */
.sites-wrapper {
  margin-top: 30px;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px 10px;
  justify-items: center;
}

@media (max-width: 600px) {
  .sites-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: white;
  transition: transform 0.2s ease;
  width: 64px;
}

.site-item:hover {
  transform: translateY(-4px);
}

.site-icon {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 12px;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.2s ease;
}

.site-item:hover .site-icon {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.site-icon-placeholder {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: white;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.site-name {
  font-size: 11px;
  margin-top: 6px;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* ============ Footer ============ */
.footer-credit {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}
