/* Pixora — fictional photo-sharing app (Killer Xmas Party).
   Ported from the WordPress/Flatsome build; the login styles were inline there
   and the stories row used the Swiper library, replaced here with a CSS scroll row. */

body {
  margin: 0;
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #fff;
  color: #0a0a0a;
}

/* ---------- Login screen ---------- */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #000;
  font-family: sans-serif;
}

.login-logo {
  height: 80px;
  margin-bottom: 30px;
}

.login-card {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 320px;
  box-sizing: border-box;
  margin: 0;
}

.login-card input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background: #333;
  border: none;
  color: #fff;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 16px;
}

.login-card input::placeholder {
  color: #9a9a9a;
}

.login-btn {
  width: 100%;
  padding: 10px;
  background: #3897f0;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  font-size: 15px;
}

.login-error {
  color: #f44336;
  margin-top: 10px;
  display: none;
}

.login-or {
  margin: 15px 0;
  text-align: center;
  color: #999;
}

.login-alt {
  width: 100%;
  background: none;
  color: #3897f0;
  border: none;
  font-weight: bold;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 14px;
}

.login-forgot {
  text-align: center;
  color: #999;
  margin: 10px 0 0;
}

.login-forgot a {
  color: #999;
}

.login-signup {
  margin-top: 20px;
  color: #999;
}

.login-signup a {
  color: #3897f0;
}

/* ---------- Feed ---------- */
.picstream {
  display: none; /* shown after login */
}

.picstream-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background-color: #fff;
}

.picstream-header {
  padding: 10px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: center;
  position: relative;
}

.picstream-logo {
  height: 40px;
}

.top-icons {
  position: absolute;
  right: 10px;
  top: 12px;
  display: flex;
  gap: 12px;
}

.top-icon {
  font-size: 20px;
  cursor: pointer;
}

/* Stories */
.stories-container {
  padding: 10px;
  border-bottom: 1px solid #ccc;
  overflow-x: hidden;
}

.stories-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stories-row::-webkit-scrollbar {
  display: none;
}

.story-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  flex: 0 0 70px;
  cursor: pointer;
  scroll-snap-align: start;
}

.story-avatar img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #e1306c;
  box-sizing: border-box;
}

.story-name {
  margin-top: 4px;
  font-size: 12px;
  color: #333;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Posts */
.feed {
  padding: 10px;
}

.post {
  margin-bottom: 20px;
}

.post-header {
  display: flex;
  align-items: center;
  padding-bottom: 8px;
}

.post-header .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

.username {
  font-weight: bold;
}

.post-image {
  position: relative;
}

.post-image img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.heart-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 48px;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.post-actions {
  padding: 6px 0;
  font-size: 18px;
  display: flex;
  align-items: center;
}

.post-actions span {
  margin-right: 10px;
  cursor: pointer;
}

.save-btn {
  margin-left: auto;
}

.post-caption {
  font-size: 14px;
  color: #333;
  white-space: pre-line;
}

/* Story viewer */
.story-viewer {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}

.story-viewer.active {
  display: flex;
}

.story-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.story-progress-container {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 0 8px;
  z-index: 1001;
}

.story-progress-segment {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.story-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 5s linear;
}

#story-image {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}

.close-story {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 28px;
  color: #ff3b30;
  cursor: pointer;
  z-index: 1100;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  padding: 4px 10px;
}
