* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html {
  background-color: inherit;
}

body {
  padding-top: calc(2rem + env(safe-area-inset-top));
  padding-left: calc(2rem + env(safe-area-inset-left));
  padding-right: calc(2rem + env(safe-area-inset-right));
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

html.light body, body.light {
  background-color: #fafafa;
  color: #1a1a1a;
}

html.dark body, body.dark {
  background-color: #0a0a0a;
  color: #e8e8e8;
}

.theme-toggle {
  position: fixed;
  top: 2.5rem;
  right: 2.5rem;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  padding: 0;
}

.theme-toggle:hover {
  opacity: 1;
}

.result-item.hidden-project .result-left {
  position: relative;
}
.result-item.hidden-project .result-left::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 1; 
  border-radius: 8px;
}
.result-item.hidden-project .result-main {
  color: transparent;
}
.result-item.hidden-project .result-main * {
  color: transparent !important;
}
.result-item.hidden-project .result-link {
  pointer-events: none;
}

.result-item.hidden-project .coming-soon {
  color: #fff !important;
  font-weight: 500;
  text-transform: none;
  opacity: 0.95;
}
.light .result-item.hidden-project .coming-soon { color: #000 !important; }

.theme-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sun-icon { fill: none; stroke: currentColor; }
.moon-icon { stroke: none; fill: currentColor; }

.light .theme-toggle,
html.light .theme-toggle,
body.light .theme-toggle {
  color: #000;
}

.dark .theme-toggle,
html.dark .theme-toggle,
body.dark .theme-toggle {
  color: #fff;
}

.container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.logo-section {
  text-align: center;
  margin-bottom: 8rem;
}

.logo {
  max-width: 240px;
  height: auto;
}

.logo-text {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  display: block;
  color: inherit;
  opacity: 0.95;
  margin-bottom: 2.5rem;
  text-align: center;
}

.main-tabs {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}
.main-tabs .tab {
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  color: inherit;
  opacity: 0.9;
  border: 1px solid transparent;
}
.main-tabs .tab:hover {
  opacity: 1;
  border-color: rgba(0,0,0,0.06);
}

.search-section {
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 1.5rem 0;
  font-size: 1.1rem;
  border: none;
  border-bottom: 1px solid;
  background: transparent;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
  text-align: center;
  font-weight: 300;
}

.light .search-input {
  border-color: #d4d4d4;
  color: #1a1a1a;
}

.dark .search-input {
  border-color: #3a3a3a;
  color: #e8e8e8;
}

.search-input:focus {
  border-color: #666;
}

.search-input::placeholder {
  opacity: 0.3;
  font-weight: 300;
}

.light .search-input::placeholder,
html.light .search-input::placeholder,
body.light .search-input::placeholder {
  color: #000;
  opacity: 0.6;
}

.light .search-input::-webkit-input-placeholder { color: #000; opacity: 0.6; }
.light .search-input:-ms-input-placeholder { color: #000; opacity: 0.6; }
.light .search-input::-ms-input-placeholder { color: #000; opacity: 0.6; }

.dark .search-input::placeholder,
html.dark .search-input::placeholder,
body.dark .search-input::placeholder {
  color: #fff;
  opacity: 0.6;
}
.dark .search-input::-webkit-input-placeholder { color: #fff; opacity: 0.6; }
.dark .search-input:-ms-input-placeholder { color: #fff; opacity: 0.6; }
.dark .search-input::-ms-input-placeholder { color: #fff; opacity: 0.6; }

.results {
  margin-top: 4rem;
  display: none;
}

.results.visible {
  display: block;
}

.result-item {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  margin-bottom: 2rem;
}

.result-link {
  display: block;
  text-decoration: none;
  padding: 1.5rem 0;
  border-bottom: 1px solid;
  transition: opacity 0.2s ease;
}

.light .result-link {
  color: #1a1a1a;
  border-color: #e8e8e8;
}

.dark .result-link {
  color: #e8e8e8;
  border-color: #262626;
}

.result-link:hover {
  opacity: 0.5;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.result-url {
  font-size: 0.9rem;
  opacity: 0.4;
  font-family: 'Courier New', monospace;
}

.result-link {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.result-left {
  width: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.res-icon {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.result-item.hidden-project .result-left img.res-icon {
  filter: brightness(1.08) contrast(1.05) saturate(0.9);
  position: relative;
  z-index: 1;
}

.res-emoji {
  font-size: 28px;
}

.res-icon-placeholder {
  width: 48px;
  height: 48px;
  display: inline-block;
  border-radius: 8px;
  background-color: rgba(255,255,255,0.04);
  background-size: cover;
  background-position: center;
}

.result-left img[onerror] + .res-icon-placeholder,
.result-left img[style*="display:none"] + .res-icon-placeholder {
  display: inline-block;
}

.res-icon-placeholder.icon-ai-intelligence { background-image: url('/thurtea-ai-assistant/assets/brain.jpg'); }
.res-icon-placeholder.icon-tools-utilities { background-image: url('/assets/images/placeholder-tools.png'); }
.res-icon-placeholder.icon-gaming-entertainment { background-image: url('/assets/images/placeholder-game.png'); }
.res-icon-placeholder.icon-business-security { background-image: url('/assets/images/placeholder-business.png'); }

.result-main {
  flex: 1 1 auto;
}

.result-desc {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.result-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.45;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.res-badge {
  background: rgba(0,0,0,0.06);
  color: inherit;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.suggestions-box {
  margin-top: 4rem;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid;
  text-align: center;
}

.light .suggestions-box {
  background-color: #f0f0f0;
  border-color: #d4d4d4;
  color: #1a1a1a;
}

.dark .suggestions-box {
  background-color: #1a1a1a;
  border-color: #3a3a3a;
  color: #e8e8e8;
}

.suggestions-box h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 400;
}

.suggestions-box p {
  margin-bottom: 1rem;
  opacity: 0.8;
}

.suggestions-box a {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
}

.suggestions-box a:hover {
  opacity: 0.7;
}

.res-priority {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-left: 0.5rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  body {
    padding: 1.5rem;
  }

  .theme-toggle {
    top: 2rem;
    right: 2rem;
  }

  .logo-section {
    margin-bottom: 6rem;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .search-input {
    font-size: 1rem;
    padding: 1.25rem 0;
  }

  .results {
    margin-top: 3rem;
  }

  .result-item {
    margin-bottom: 1.5rem;
  }

  .result-link {
    padding: 1.25rem 0;
  }

  .result-title {
    font-size: 1rem;
  }

  .result-url {
    font-size: 0.85rem;
  }
}

/* Suggestions Button & Modal */
.suggestions-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1000;
}

.light .suggestions-toggle,
html.light .suggestions-toggle {
  background: #1a1a1a;
  color: #fafafa;
}

.dark .suggestions-toggle,
html.dark .suggestions-toggle {
  background: #e8e8e8;
  color: #0a0a0a;
}

.suggestions-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.suggestions-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
}

.modal-content {
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.light .modal-content,
html.light .modal-content {
  background: #fafafa;
  color: #1a1a1a;
}

.dark .modal-content,
html.dark .modal-content {
  background: #1a1a1a;
  color: #e8e8e8;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 0.5rem;
}

.light .modal-close,
html.light .modal-close {
  color: #1a1a1a;
}

.dark .modal-close,
html.dark .modal-close {
  color: #e8e8e8;
}

.modal-close:hover {
  opacity: 1;
}

.modal-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

#suggestionForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#suggestionText {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid;
  border-radius: 8px;
  resize: vertical;
  min-height: 120px;
}

.light #suggestionText,
html.light #suggestionText {
  background: #fff;
  color: #1a1a1a;
  border-color: #d0d0d0;
}

.dark #suggestionText,
html.dark #suggestionText {
  background: #0a0a0a;
  color: #e8e8e8;
  border-color: #333;
}

#suggestionText:focus {
  outline: none;
  border-color: #666;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-submit,
.btn-cancel {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit {
  background: white;
  color: black;
}

html.dark .btn-submit,
body.dark .btn-submit {
  background: black;
  color: white;
}

.btn-submit:hover {
  background: #f0f0f0;
}

html.dark .btn-submit:hover,
body.dark .btn-submit:hover {
  background: #1a1a1a;
}

.btn-submit:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

html.dark .btn-submit:disabled,
body.dark .btn-submit:disabled {
  background: #333;
  color: #999;
}

.btn-cancel {
  background: transparent;
  border: 1px solid;
}

.light .btn-cancel,
html.light .btn-cancel {
  border-color: #d0d0d0;
  color: #1a1a1a;
}

.dark .btn-cancel,
html.dark .btn-cancel {
  border-color: #333;
  color: #e8e8e8;
}

.btn-cancel:hover {
  opacity: 0.7;
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  display: block;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  display: block;
}

@media (max-width: 768px) {
  .suggestions-toggle {
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }

  .suggestions-modal {
    padding: 1rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-content h3 {
    font-size: 1.25rem;
  }
}

/* Content blocks and CTA buttons */
.content-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.content-block {
  text-align: center;
}

.content-block h3 {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.content-block p {
  opacity: 0.8;
  line-height: 1.6;
}

.p-cta {
  margin-top: 1.5rem;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  transition: all 0.2s ease;
  border: 1px solid;
}

.light .cta-button,
html.light .cta-button {
  background: #1a1a1a;
  color: #fafafa;
  border-color: #1a1a1a;
}

.dark .cta-button,
html.dark .cta-button {
  background: #e8e8e8;
  color: #0a0a0a;
  border-color: #e8e8e8;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-button span {
  color: inherit;
}

/* Code blocks for guides */
.code-block {
  margin: 1.5rem 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px 8px 0 0;
  font-weight: 500;
  font-size: 0.9rem;
}

.light .code-header,
html.light .code-header {
  background: #e8e8e8;
  color: #1a1a1a;
}

.dark .code-header,
html.dark .code-header {
  background: #2a2a2a;
  color: #e8e8e8;
}

.code-block pre {
  margin: 0;
  padding: 1.5rem;
  border-radius: 0 0 8px 8px;
  overflow-x: auto;
  line-height: 1.6;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.light .code-block pre,
html.light .code-block pre {
  background: #f5f5f5;
  color: #1a1a1a;
}

.dark .code-block pre,
html.dark .code-block pre {
  background: #1a1a1a;
  color: #e8e8e8;
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
  background: none;
  padding: 0;
}

.copy-btn {
  padding: 0.4rem 1rem;
  border: 1px solid;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.light .copy-btn,
html.light .copy-btn {
  background: #fff;
  color: #1a1a1a;
  border-color: #d0d0d0;
}

.dark .copy-btn,
html.dark .copy-btn {
  background: #0a0a0a;
  color: #e8e8e8;
  border-color: #444;
}

.copy-btn:hover {
  opacity: 0.8;
}

.copy-btn.copied {
  opacity: 0.6;
}

.note-text {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.6;
}
