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

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: #1a1a1b;
  color: #d7dadc;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  color: #ff4500;
  margin-bottom: 20px;
  font-size: 2.5rem;
}

.search-container {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
}

input {
  flex: 1;
  padding: 12px;
  border: 1px solid #343536;
  border-radius: 4px;
  background: #272729;
  color: #d7dadc;
  font-size: 16px;
}

button {
  padding: 12px 24px;
  background: #ff4500;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

button:hover {
  background: #cc3700;
}

.reddit-post {
  background: #272729;
  border: 1px solid #343536;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.5s ease-out;
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.subreddit {
  color: #4fbcff;
  margin-right: 10px;
}

.author {
  color: #818384;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.post-content {
  color: #d7dadc;
  margin-bottom: 15px;
}

.media-preview {
  width: 100%;
  max-height: 400px;
  background: #1a1a1b;
  border-radius: 4px;
  margin-bottom: 15px;
  overflow: hidden;
  position: relative;
}

.media-preview img, 
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-footer {
  display: flex;
  gap: 15px;
  color: #818384;
  font-size: 0.9rem;
}

.loading-screen {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #343536;
  border-top: 4px solid #ff4500;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

.hidden {
  display: none;
}

.intro-text {
  text-align: center;
  color: #818384;
  padding: 40px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@media (max-width: 600px) {
  .container {
    padding: 10px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
}