:root {
  --bg-color: #ECE2E3;      /* Updated to match your image */
  --card-bg: #FAF3EC;
  --text-main: #7E5B5B;
  --text-muted: #947272;
  --gold-accent: #7E5B5B;
  --olive-btn: #7E5B5B;
  --olive-btn-hover: #684848;
  --border-color: #E2D3C4;
  --upload-bg: #ECE2E3;     /* Updated to match the background */
  --upload-border: #E8D9CD;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 10px;
}

.page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
              radial-gradient(circle at 90% 90%, rgba(210, 185, 165, 0.2) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: 480px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(126, 91, 91, 0.08);
  padding: 35px 25px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 211, 196, 0.6);
}

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

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: -55px;
}

.brand-logo {
  max-width: 100%;
  width: 320px;
  height: auto;
  border: none;
  background: transparent;
  mix-blend-mode: multiply;
}

.subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* -------------------------------------
   Infinite Auto-Slider Styles
-------------------------------------- */
.slider-container {
  width: 100%;
  height: 160px; 
  overflow: hidden;
  margin-bottom: 25px;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.slider-track {
  display: flex;
  width: max-content;
  animation: slide-left 18s linear infinite; 
}

.slider-track:hover {
  animation-play-state: paused;
}

.slider-track img {
  width: 240px; 
  height: 160px;
  object-fit: cover; 
  border-radius: 12px;
  margin-right: 6px; 
  box-shadow: 0 4px 10px rgba(126, 91, 91, 0.15);
}

@keyframes slide-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.header-upload-copy {
  margin-bottom: 25px;
}

.header-upload-copy h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.upload-copy-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 500; 
}

.upload-main-copy {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 15px;
  margin-bottom: 25px; 
  text-align: center;
}

.upload-section {
  margin-bottom: 25px;
}

.upload-box {
  background-color: var(--upload-bg);
  border: 2px dashed var(--upload-border);
  border-radius: 16px;
  padding: 25px 20px;
  text-align: center;
}

.upload-top-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.action-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.action-tile {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: all 0.2s;
}

.action-tile span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-main);
}

.action-tile:hover {
  background: #FAF3EC;
  border-color: var(--gold-accent);
}

.invisible-input {
  display: none;
}

.selected-preview-banner {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--olive-btn);
  font-weight: 500;
}

#upload-btn {
  width: 100%;
  background-color: var(--olive-btn);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
  box-shadow: 0 4px 10px rgba(126, 91, 91, 0.2);
}

#upload-btn:hover {
  background-color: var(--olive-btn-hover);
}

.progress-container {
  display: none;
  position: relative;
  width: 100%;
  height: 26px;
  background-color: var(--border-color);
  border-radius: 8px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: var(--olive-btn);
  transition: width 0.3s ease-in-out;
}

#progress-text {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  z-index: 2;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 30px 0 25px 0;
}

.section-divider .line {
  height: 1px;
  flex-grow: 1;
  background-color: var(--border-color);
}

.gallery-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1.5px;
  color: var(--text-main);
  margin-bottom: 15px;
}

.gallery-scroll-container {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-accent) var(--border-color);
}

.gallery-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.gallery-scroll-container::-webkit-scrollbar-track {
  background: var(--upload-bg);
  border-radius: 4px;
}

.gallery-scroll-container::-webkit-scrollbar-thumb {
  background-color: var(--gold-accent);
  border-radius: 4px;
}

.empty-state {
  text-align: center;
  padding: 20px 0 10px 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 300;
}

.empty-state::after {
  content: "";
  display: block;
  width: 120px;
  height: 60px;
  margin: 15px auto 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='60' viewBox='0 0 120 60' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 25H90V55H30V25Z' stroke='%23947272' stroke-width='1.2' stroke-dasharray='3 3'/%3E%3Ccircle cx='60' cy='40' r='10' stroke='%23947272' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--upload-bg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-thumbnail-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-duration-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.play-icon-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  padding-left: 2px;
}

.delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #d9534f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.admin-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 30px;
}

#admin-toggle-btn {
  background-color: var(--upload-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 10px 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  transition: all 0.2s;
}

#admin-toggle-btn:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

.footer-logo-container {
  position: absolute;
  right: 0px;
  display: flex;
  align-items: center;
}

.footer-brand-logo {
  height: 80px; 
  width: auto;
  opacity: 0.85;
  mix-blend-mode: multiply;
  position: relative;
  top: 25px;   
  left: 15px;  
}

.story-recorder-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  touch-action: none;
  overscroll-behavior: none;
}

.story-recorder-modal.active {
  display: flex;
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}

.story-top-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.story-icon-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s;
}

.story-icon-btn:active {
  transform: scale(0.9);
}

.story-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

.story-viewfinder {
  position: relative;
  width: 100%;
  flex-grow: 1;
  max-height: 70vh;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.story-viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 0.08s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.story-viewfinder video.mirrored {
  transform: scaleX(-1);
}

.zoom-control-container {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  padding: 16px 8px;
  border-radius: 24px;
  z-index: 10;
  gap: 12px;
  touch-action: none;
}

#zoom-level-text {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

#zoom-slider {
  writing-mode: bt-lr;
  -webkit-appearance: slider-vertical;
  width: 8px;
  height: 180px;
  accent-color: var(--text-main);
  cursor: pointer;
  touch-action: none;
}

.story-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
}

.story-record-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid #fff;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.story-record-btn::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  background: #ff3b30;
  border-radius: 50%;
  transition: all 0.2s;
}

.story-record-btn.recording::after {
  border-radius: 8px;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.story-actions {
  display: flex;
  gap: 15px;
  width: 100%;
  justify-content: center;
}

.story-secondary-btn, .story-primary-btn {
  padding: 12px 24px;
  border-radius: 30px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.story-secondary-btn {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.story-primary-btn {
  background: var(--olive-btn);
  color: #fff;
}

.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

#lightbox-media-container img,
#lightbox-media-container video {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 36px;
  cursor: pointer;
  z-index: 1010;
}

.lightbox-download-btn {
  background-color: var(--olive-btn);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: background 0.2s;
}

.lightbox-download-btn:hover {
  background-color: var(--olive-btn-hover);
}

/* --- SOFS26 P.S. Section --- */
.ps-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
  margin-top: 15px;
}

.sofs-link {
  color: var(--olive-btn);
  text-decoration: underline; 
  cursor: pointer;
  font-weight: 700;
  transition: color 0.2s;
}

.sofs-link:hover {
  color: var(--olive-btn-hover);
}
