/* Rowhan App - Main Stylesheet */
/* Mobile-first, responsive, modern design */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== PREMIUM AVATAR SIZING ===== */
/* Mobile: 300px height */
.premium-avatar-container {
  width: auto;
  height: 300px;
}

.premium-avatar-img {
  width: auto;
  height: 300px;
  max-width: none;
  max-height: none;
}

/* Desktop: 300px height, positioned higher */
@media (min-width: 768px) {
  .premium-avatar-container {
    width: auto;
    height: 300px;
    transform: translate(-50%, calc(-50% - 50px));
  }

  .premium-avatar-img {
    width: auto;
    height: 300px;
  }
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  background-color: #000000;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  color: #fff;
  position: fixed;
  background-color: #000000;
}


/* ===== BACKGROUND MEDIA ===== */
.bg-media-mobile,
.bg-media-desktop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
  pointer-events: none !important;
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Desktop device: show desktop bg, hide mobile */
body.is-desktop-device .bg-media-desktop {
  display: block;
}

body.is-desktop-device .bg-media-mobile {
  display: none;
}

/* Mobile device: show mobile bg, hide desktop */
body.is-mobile-device .bg-media-desktop {
  display: none;
}

body.is-mobile-device .bg-media-mobile {
  display: block;
}

/* ===== 3D CUBE ANIMATION ===== */
.cube-3d {
  position: fixed;
  top: 50%;
  left: 50%;
  margin-top: -241px;
  margin-left: -241px;
  width: 483px;
  height: 483px;
  transform-style: preserve-3d;
  transform-origin: 241px 241px;
  animation: spinCube 18s linear infinite;
  z-index: 1;
  pointer-events: none;
}

.cube-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 483px;
  height: 483px;
  background: transparent;
}

.cube-dot {
  position: absolute;
  background: rgba(255, 255, 255, 1);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Dot positions - 3x3 grid */
.dot-p1 { top: -2px; left: 0%; margin-left: -2px; }
.dot-p2 { top: -2px; left: 50%; margin-left: -2px; }
.dot-p3 { top: -2px; left: 100%; margin-left: -2px; }
.dot-p4 { top: 50%; left: -2px; margin-top: -2px; }
.dot-p5 { top: 50%; left: 50%; margin-top: -2px; margin-left: -2px; }
.dot-p6 { top: 50%; left: 100%; margin-top: -2px; margin-left: -2px; }
.dot-p7 { top: 100%; left: 0%; margin-top: -2px; margin-left: -2px; }
.dot-p8 { top: 100%; left: 50%; margin-top: -2px; margin-left: -2px; }
.dot-p9 { top: 100%; left: 100%; margin-top: -2px; margin-left: -2px; }

/* Dot positions - 2x2 corners */
.dot-p10 { top: 25%; left: 25%; margin-top: -2px; margin-left: -2px; }
.dot-p11 { top: 25%; left: 75%; margin-top: -2px; margin-left: -2px; }
.dot-p12 { top: 75%; left: 25%; margin-top: -2px; margin-left: -2px; }
.dot-p13 { top: 75%; left: 75%; margin-top: -2px; margin-left: -2px; }

/* Cube face depths */
.face-f1 { transform: translateZ(-241px); }
.face-f2 { transform: translateZ(-193px); }
.face-f3 { transform: translateZ(-145px); }
.face-f4 { transform: translateZ(-97px); }
.face-f5 { transform: translateZ(-48px); }
.face-f6 { transform: translateZ(0); }
.face-f7 { transform: translateZ(48px); }
.face-f8 { transform: translateZ(97px); }
.face-f9 { transform: translateZ(145px); }
.face-f10 { transform: translateZ(193px); }
.face-f11 { transform: translateZ(241px); }

@keyframes spinCube {
  0% { transform: rotateY(0deg) rotateX(-45deg) rotate(0deg); }
  50% { transform: rotateY(180deg) rotateX(135deg) rotate(180deg); }
  100% { transform: rotateY(360deg) rotateX(315deg) rotate(360deg); }
}

/* ===== TAGLINE ===== */
.tagline {
  font-size: 1.25rem;
  color: #FFFFFF;
  font-weight: 300;
  font-style: italic;
  text-shadow: 0 0 8px rgba(0,0,0,0.6);
  letter-spacing: 1px;
  margin: 10px 0 24px 0;
  transform: translateY(-40px);
}

.tagline-text {
  display: inline-block;
  transition: opacity 0.5s ease;
}

/* ===== UTILITIES ===== */
.z-1 { position: relative; z-index: 1; }
.z-10 { position: relative; z-index: 10; }
.z-50 { position: relative; z-index: 50; }

/* ===== CONTAINERS ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  gap: 0.5rem;
  height: 50px;
}

.btn-primary {
  background: #40E0D0;
  color: #000;
  box-shadow: 0 4px 15px rgba(64, 224, 208, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(64, 224, 208, 0.5);
}

.btn-secondary {
  background: transparent;
  border: 1px solid white;
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-google {
  background: #4285F4;
  color: #fff;
}

.btn-google:hover {
  background: #3367D6;
  box-shadow: 0 8px 25px rgba(66, 133, 244, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== INPUTS ===== */
.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-field::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.input-field:focus {
  outline: none;
  border-color: #40E0D0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(64, 224, 208, 0.2);
}

textarea.input-field {
  resize: vertical;
  min-height: 100px;
}

/* ===== CARDS ===== */
.card {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1.5rem;
  border: none;
}

#enrichment-memory-card .card {
  max-width: 100%;
}

#enrichment-memory-card .card .relative.flex-shrink-0 {
  width: 150px !important;
  height: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  min-height: 150px !important;
  max-height: 150px !important;
}

#enrichment-memory-card .card img,
#enrichment-memory-card .card #enrichment-preview-image {
  width: 150px !important;
  height: 150px !important;
}

/* ===== IMAGES ===== */
#auth-screen img {
  max-width: 100%;
  height: auto;
  display: block;
}

#auth-screen img[alt*="Robot"],
#auth-screen img[src*="robot"] {
  width: 8rem !important;
  height: 8rem !important;
  object-fit: contain;
}

#auth-screen img[alt*="Logo"],
#auth-screen img[src*="logo"] {
  width: 12rem !important;
  max-width: 100%;
  height: auto !important;
  object-fit: contain;
  transform: translateY(-20px);
}

#auth-screen img[alt="Rowhan Logo"] {
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
}

/* ===== HEADER STYLES ===== */
header {
  background: transparent !important;
}

header > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

@media (min-width: 768px) {
  #home-btn {
    grid-column: 2;
    justify-self: center;
  }

  header > div > div:first-of-type {
    grid-column: 3;
    justify-self: end;
  }
}

@media (max-width: 767px) {
  header > div {
    display: flex;
    justify-content: space-between;
  }
}

header button {
  background: transparent !important;
  border: none !important;
  padding: 0.5rem;
  transition: opacity 0.3s ease;
}

header button:hover {
  background: transparent !important;
  opacity: 0.8;
}

/* Close buttons (X) - NO WHITE BACKGROUND */
button[id*="close"],
button[id*="menu-btn"],
button[id*="filter-btn"],
.card button:has(svg) {
  background: transparent !important;
  border: none !important;
}

button[id*="close"]:hover,
button[id*="menu-btn"]:hover,
button[id*="filter-btn"]:hover,
.card button:has(svg):hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ===== SIDE MENU BLACK TRANSPARENT + BLUR ===== */
#side-menu {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(20px);
}

#side-menu button {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#side-menu button:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#side-menu button:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* ===== MENU ITEMS ===== */
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.063rem 1rem;
  border-radius: 0.5rem;
  color: #fff;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 0.875rem;
  text-align: left;
  transition: all 0.2s ease;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ===== MEMORY CARDS WITH BORDERS ===== */
.memory-card {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  border: none;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#enrichment-memory-card .memory-card {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.memory-card:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Memory action buttons with borders */
.memory-action-btn {
  padding: 0.625rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #333;
  transition: all 0.2s ease;
  cursor: pointer;
}

.memory-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ===== EDIT ACTION BUTTONS ===== */
.btn-edit-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-edit-action:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn-edit-action svg {
  flex-shrink: 0;
}

/* Enrichment buttons (above chat input) */
#enrichment-image-btn,
#enrichment-title-btn {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

#enrichment-image-btn:hover,
#enrichment-title-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

/* ===== CHAT INTERFACE ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  display: flex;
  gap: 1px;
  animation: slideIn 0.3s ease-out;
}

@media (min-width: 768px) {
  .chat-message.bot,
  .chat-message.user {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
}

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

.chat-message.bot {
  justify-content: flex-start;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 0;
  box-sizing: border-box;
}

.chat-bubble {
  max-width: 75%;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.chat-bubble.bot {
  padding-right: 1.25rem;
  margin-top: 10px;
}

@media (min-width: 768px) {
  .chat-bubble.bot {
    max-width: 550px;
  }
}

.chat-bubble.bot {
  background: rgba(0, 0, 0, 0.4);
  color: white;
}

.chat-bubble.user {
  background: rgba(38, 134, 125, 0.5);
  color: #fff;
}

.chat-input-area {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  margin-top: 1rem;
}

.chat-input-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 42rem;
  z-index: 40;
  padding: 1rem;
  padding-bottom: 1.5rem;
}

.chat-input {
  flex: 1;
  background: #fff;
  border: 1px solid rgba(64, 224, 208, 0.3);
  border-radius: 24px;
  padding: 0.75rem 1rem;
  color: #333;
  font-size: 0.875rem;
  font-family: Arial, sans-serif;
  resize: none;
  max-height: 120px;
}

@media (min-width: 768px) {
  .chat-input {
    max-width: 600px;
  }
}

.chat-input::placeholder {
  font-family: Arial, sans-serif;
  color: rgba(0, 0, 0, 0.5);
}

.chat-input:focus {
  outline: none;
  border-color: #40E0D0;
  box-shadow: 0 0 0 3px rgba(64, 224, 208, 0.1);
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.4);
  border-top-color: #40E0D0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .cube-3d {
    width: 345px;
    height: 345px;
    margin-top: -173px;
    margin-left: -173px;
    transform-origin: 173px 173px;
  }

  .cube-face {
    width: 345px;
    height: 345px;
  }

  .face-f1 { transform: translateZ(-173px); }
  .face-f2 { transform: translateZ(-138px); }
  .face-f3 { transform: translateZ(-104px); }
  .face-f4 { transform: translateZ(-69px); }
  .face-f5 { transform: translateZ(-35px); }
  .face-f6 { transform: translateZ(0px); }
  .face-f7 { transform: translateZ(35px); }
  .face-f8 { transform: translateZ(69px); }
  .face-f9 { transform: translateZ(104px); }
  .face-f10 { transform: translateZ(138px); }
  .face-f11 { transform: translateZ(173px); }

  .tagline {
    font-size: 1.1rem;
  }

  .btn {
    height: 44px;
    font-size: 0.875rem;
  }

  .menu-item {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .chat-bubble {
    max-width: 85%;
  }

  .chat-avatar {
    width: 40px;
    height: 40px;
    border: 1px solid white;
  }
}

@media (max-width: 480px) {
  .cube-3d {
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
  }

  .cube-face {
    width: 200px;
    height: 200px;
  }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid #40E0D0;
  outline-offset: 2px;
}


/* ===== CHAT NAME LABEL ===== */
.chat-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.25rem;
  margin-left: 0.5rem;
}

.chat-message.user .chat-name {
  text-align: right;
  margin-right: 0.5rem;
  margin-left: 0;
  color: #40E0D0;
}

.chat-content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ===== MAIN SCREENS Z-INDEX ===== */
#main-app,
#auth-screen,
#interview-screen,
#memories-screen,
#avatar-screen,
#feed-screen,
#profile-screen,
#subscription-screen {
  position: relative;
  z-index: 10;
}

/* ===== PROFILE PAGE ===== */
#profile-screen {
  max-width: 1000px !important;
  padding: 0 1rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

#profile-screen .input-field {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  width: 100%;
  transition: all 0.3s ease;
}

#profile-screen .input-field:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #40E0D0;
  outline: none;
}

#profile-screen .input-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#profile-screen textarea.input-field {
  resize: vertical;
  min-height: 80px;
}

#profile-screen input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.background-option {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.background-option:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.background-option.active {
  border-color: #40E0D0;
  background: rgba(64, 224, 208, 0.1);
}

/* Select Avatar Button Positioning */
#select-avatar-btn {
  bottom: 210px;
}

@media (min-width: 768px) {
  #select-avatar-btn {
    bottom: 140px;
  }
}

.bg-preview {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#background-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

#background-selector .background-option {
  background: none;
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

#background-selector .background-option:hover {
  border-color: rgba(64, 224, 208, 0.5);
  transform: translateY(-4px);
}

#background-selector .background-option.selected {
  border-color: #40E0D0;
  box-shadow: 0 0 20px rgba(64, 224, 208, 0.6);
}

#background-selector .bg-preview {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#upload-photo-btn {
  background: linear-gradient(135deg, #40E0D0 0%, #2DD4BF 100%);
  box-shadow: 0 4px 12px rgba(64, 224, 208, 0.3);
  transition: all 0.3s ease;
}

#upload-photo-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(64, 224, 208, 0.5);
}

#profile-screen h2 {
  padding-top: 0.5rem !important;
  margin-top: 0 !important;
}

#edit-profile-btn,
#cancel-profile-btn {
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
}

#edit-profile-btn:hover {
  background: rgba(64, 224, 208, 0.2) !important;
  border-color: #40E0D0 !important;
  transform: scale(1.05);
}

#cancel-profile-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: scale(1.05);
}

/* ===== TOGGLE SWITCH (Private/Public) ===== */
.privacy-toggle {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  cursor: pointer;
  transition: background 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.privacy-toggle.public {
  background: rgba(64, 224, 208, 0.3);
  border-color: #40E0D0;
}

.privacy-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 36px;
  height: 20px;
  background: white;
  border-radius: 20px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.privacy-toggle.public .privacy-toggle-slider {
  transform: translateX(14px);
}

/* ===== NEW PRIVACY TOGGLE (Privé/Public with circle) - 50% reduced ===== */
.privacy-toggle-new {
  position: relative;
  width: 18px;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0;
}

.privacy-toggle-new.public {
  background: rgba(64, 224, 208, 0.3);
  border-color: #40E0D0;
}

.privacy-toggle-circle {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.privacy-toggle-new.public .privacy-toggle-circle {
  transform: translateX(8px);
}

.privacy-label-private,
.privacy-label-public {
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.6;
  font-size: 10px;
}

.privacy-label-private.active,
.privacy-label-public.active {
  color: #40E0D0;
  opacity: 1;
  font-weight: 600;
}

/* ===== LIKE BUTTON ===== */
.like-btn {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.like-btn:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== PROFILE PHOTOS WHITE BORDER ===== */
/* Profile photo container in profile screen */
#profile-photo-container {
  border: 4px solid white !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
}

/* Profile photo image itself has no border (container has it) */
#profile-photo-display {
  border: none !important;
}

/* Other profile photos in feed etc */
img[alt*="profil" i]:not(#profile-photo-display),
img[src*="profile" i]:not(#profile-photo-display),
.profile-photo {
  border: 1px solid white !important;
  box-sizing: border-box !important;
}

/* ===== PUBLIC FEED STYLES (keep different from memories) ===== */
#feed-screen .memory-card img.rounded-full {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  object-fit: cover !important;
  border: 1px solid white !important;
  box-sizing: border-box !important;
}

/* Public feed memory images keep their own layout */
#feed-screen .memory-card .relative.flex-shrink-0 {
  width: auto !important;
  height: auto !important;
}

#feed-screen .memory-card img:not(.rounded-full) {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
}

/* Public feed image container - ensure proper cover behavior */
#feed-screen .public-memory-image-container {
  overflow: hidden;
}

#feed-screen .public-memory-image-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* Responsive grid for public feed - desktop only */
@media (min-width: 768px) {
  #feed-list {
    grid-template-columns: repeat(2, 1fr) !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  #feed-screen {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (min-width: 1024px) {
  #feed-list {
    grid-template-columns: repeat(2, 1fr) !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }

  #feed-screen {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

@media (min-width: 1280px) {
  #feed-list {
    grid-template-columns: repeat(3, 1fr) !important;
    padding-left: 4rem !important;
    padding-right: 4rem !important;
  }

  #feed-screen {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }
}

@media (min-width: 1536px) {
  #feed-list {
    padding-left: 6rem !important;
    padding-right: 6rem !important;
  }

  #feed-screen {
    padding-left: 4rem !important;
    padding-right: 4rem !important;
  }
}

/* Desktop - Fix logo-ia size on auth screen */
@media (min-width: 768px) {
  #auth-screen #logo-ia-container {
    max-width: 500px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  #auth-screen #logo-ia-container p {
    position: relative !important;
    z-index: 10 !important;
    margin-bottom: 0.5rem !important;
    order: 1 !important;
  }

  #auth-screen #logo-ia-img {
    width: 100% !important;
    max-width: 500px !important;
    position: relative !important;
    z-index: 5 !important;
    order: 2 !important;
  }
}

/* Mobile keeps single column */
@media (max-width: 767px) {
  #feed-list {
    grid-template-columns: 1fr !important;
  }
}

/* Hide flag emojis on desktop, keep text only */
@media (min-width: 768px) {
  #desktop-language-flags .language-flag-btn span {
    display: none;
  }
}

/* ===== MAP MODAL ===== */
.map-modal-content {
  width: 90%;
  max-width: 900px;
}

.map-modal-content .modal-body {
  padding: 1.5rem;
}

.heart-marker {
  background: none;
  border: none;
}

.leaflet-popup-content-wrapper {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 8px;
}

.leaflet-popup-tip {
  background: rgba(0, 0, 0, 0.8);
}

/* ===== GEOLOCATION & WEATHER ICONS ===== */
.memory-icon-btn {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.memory-icon-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.memory-icon-btn:active {
  transform: scale(0.95);
}

.weather-icon-display {
  font-size: 24px;
  margin-right: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.memory-meta-weather {
  display: flex;
  align-items: center;
  gap: 4px;
}

.memory-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Profile stats grid - responsive layout */
/* Base: 2 columns for tablet/desktop */
.stats-grid-profile {
  grid-template-columns: repeat(2, 1fr) !important;
  box-sizing: border-box;
  max-width: 100%;
}

/* Large desktop: 3 columns */
@media (min-width: 1200px) {
  .stats-grid-profile {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Page title size reduction - 30% smaller */
#page-title {
  font-size: 0.875rem !important;
}

/* Menu buttons - increase vertical padding by 5px */
#side-menu button {
  padding-top: 13px !important;
  padding-bottom: 13px !important;
}
