/* styles.css - Mobile Optimized */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-shadow: 0 0 2px rgba(255,255,255,0.3);
  font-family: 'Noto Naskh Arabic', serif;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  height: 100%;
  background-color: #0a0a0a;
  overflow-x: hidden;
  direction: rtl;
  color: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(circle, #1a1a1a 0%, #0a0a0a 100%);
  touch-action: manipulation;
  overscroll-behavior: contain;
}

/* EDIT: Major Responsive Overhaul */
@media (max-width: 768px) {
  .header-nav {
    display: none !important;
  }
}

@media (max-width: 600px) {
  /* Welcome Screen Mobile Styles */
  .logo-container {
    width: 180px !important;
    height: 180px !important;
  }
  #loginBtn {
    margin-top: 20px !important;
    padding: 12px 30px !important;
    font-size: 18px !important;
  }

  /* Main Page Mobile Styles */
  .main-title { font-size: 22px !important; }
  .sub-title { font-size: 12px !important; }
  .question-text { font-size: 18px !important; padding: 15px !important; }
  
  .buttons {
    grid-template-columns: 1fr 1fr !important; /* Two columns for buttons */
    gap: 15px !important;
  }
  .buttons button, .buttons button.wide {
    padding: 12px 8px !important;
    font-size: 14px !important;
    min-height: 65px !important;
    grid-column: span 1 !important; /* Make all buttons same width */
  }
  .buttons button.wide {
    grid-column: 1 / -1 !important; /* Make wide button span full width */
  }
  
  #questionText { font-size: 18px !important; }
  .option {
    padding: 12px 10px !important;
    font-size: 15px !important;
    min-height: 55px;
  }
  
  #navigationButtons button {
    padding: 12px 15px !important;
    font-size: 16px !important;
    width: 100px !important;
  }

  /* Chat Mobile styles */
  #chatContainer {
    width: 100% !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
  }
}
/* END EDIT */

/* Welcome animation */
#welcomeScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #0a0a0a 0%, #1a1a1a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center vertically by default */
  align-items: center;
  z-index: 1000;
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
  overflow: hidden;
}

/* EDIT: New Transition Styles */
#welcomeScreen.slide-up {
    transform: translateY(-100%);
    opacity: 0;
}

#welcomeScreen.active > #welcomeLogo {
    transform: translateY(-20vh) scale(0.5);
}
#welcomeScreen.active > #loginBtn {
    transform: translateY(-20vh) scale(0.5);
}
/* END EDIT */


#welcomeLogo {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  z-index: 1002;
  position: relative;
  transition: transform 1s ease-out; /* Smooth transition for move/shrink */
}

.logo-container {
  width: 250px;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: pulse 3s ease-in-out infinite;
  overflow: hidden;
  border-radius: 50%;
  position: relative;
}

.logo-container::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(45deg);
  animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(255, 153, 0, 0.7);
}

#loginBtn {
    margin-top: 40px;
    padding: 15px 40px;
    font-size: 22px;
    font-weight: bold;
    color: #000;
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    border: 2px solid #ffcc00;
    border-radius: 50px;
    cursor: pointer;
    z-index: 1002;
    transition: transform 1s ease-out; /* Smooth transition for move/shrink */
    box-shadow: 0 5px 20px rgba(255, 153, 0, 0.4);
}

#loginBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.6);
}

#loginBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: scale(1);
}

/* Bubbles styling */
#bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1001;
}

.bubble {
    position: absolute;
    bottom: -250px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    animation-name: rise-and-wobble;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0; 
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
}

.bubble.animate {
    opacity: 0.7;
}

.bubble.small { width: 60px; height: 60px; }
.bubble.medium { width: 120px; height: 120px; }
.bubble.large { width: 180px; height: 180px; }
.bubble.xlarge { width: 250px; height: 250px; } 

@keyframes rise-and-wobble {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-60vh) translateX(20px);
    }
    100% {
        transform: translateY(-120vh) translateX(-20px);
        opacity: 0;
    }
}

.question-text {
  color: white;
  font-weight: bold;
  font-size: 32px;
  margin-bottom: 40px;
  text-align: center;
  max-width: 90%;
  line-height: 1.6;
  text-shadow: 0 0 15px rgba(255, 153, 0, 0.5);
  padding: 25px;
  border-radius: 20px;
  background: rgba(0,0,0,0.6);
  border: 2px solid #ff9900;
  opacity: 1;
  transition: opacity 0.5s ease;
  font-family: 'Noto Naskh Arabic', serif;
}

#quizContainer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 750px;
  color: white;
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
  z-index: 15;
  background: rgba(20, 20, 20, 0.95);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 153, 0, 0.2);
  direction: rtl;
  display: none;
  line-height: 1.6;
  border: 2px solid #444;
  font-family: 'Noto Naskh Arabic', serif;
  overflow-y: auto;
  max-height: 90vh;
}

#questionText {
  font-size: 26px;
  margin-bottom: 25px;
  text-align: center;
  line-height: 1.6;
  color: #ffcc00;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(255,255,255,0.4);
  padding-bottom: 15px;
  border-bottom: 2px solid #444;
}

.option {
  display: block;
  margin: 18px 0;
  padding: 14px 22px;
  background: rgba(60, 60, 60, 0.7);
  border-radius: 8px;
  border: 1px solid #555;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 20px;
  text-align: right;
}

#quizContainer.show {
  opacity: 1;
  display: block;
}

#progressContainer, #resultContainer, .buttons button, .message {
  font-family: 'Noto Naskh Arabic', serif;
}

.cooldown-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.cooldown-content {
  text-align: center;
  padding: 40px;
  background: rgba(30, 30, 30, 0.95);
  border-radius: 15px;
  border: 2px solid #ff9900;
  max-width: 90%;
  width: 600px;
}

.cooldown-title {
  color: #ffcc00;
  font-size: 36px;
  margin-bottom: 20px;
}

.cooldown-text {
  font-size: 24px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.cooldown-timer {
  font-size: 48px;
  color: #ff9900;
  font-weight: bold;
  margin-bottom: 30px;
}

.cooldown-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.cooldown-btn {
  padding: 15px 30px;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-weight: bold;
}

.cooldown-btn.main-menu {
  background: linear-gradient(135deg, #ff9900, #ff6600);
  color: #000;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 50px rgba(255, 153, 0, 0.7); }
  50% { transform: scale(1.1); box-shadow: 0 0 70px rgba(255, 153, 0, 0.9); }
  100% { transform: scale(1); box-shadow: 0 0 50px rgba(255, 153, 0, 0.7); }
}

.background-logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 153, 0, 0.1), rgba(255, 102, 0, 0.1));
  background-size: 90% auto;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(12px);
  opacity: 0.08;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  height: 100%;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 1s ease-in, transform 1s ease-in;
  overflow-y: auto;
}

.container.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 2px solid #ff9900;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 250px;
}

.logo-image {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffcc00;
  transition: transform 0.5s ease;
  cursor: pointer;
}

.logo-image:hover { transform: rotate(15deg); }

.logo-text {
  display: flex;
  flex-direction: column;
}

.main-title {
  font-size: 32px;
  font-weight: bold;
  color: #ffcc00;
  letter-spacing: 1px;
}

.sub-title {
  font-size: 18px;
  color: #aaa;
  margin-top: 5px;
}

.header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
.header-nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: color 0.3s ease;
}
.header-nav a:hover { color: #ffcc00; }

.music-controls {
  background: rgba(30, 30, 30, 0.7);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ff9900;
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-controls:hover {
  background: rgba(50, 50, 50, 0.9);
  transform: scale(1.1);
}

.music-controls i { font-size: 24px; color: #ffcc00; }

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  width: 100%;
  max-width: 900px;
  margin-top: 30px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.buttons.hidden { opacity: 0; pointer-events: none; }

.buttons button {
  padding: 20px 15px;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #1a1a1a, #333);
  border: 2px solid #ff9900;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.buttons button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff9900, #ff6600);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.buttons button:hover::before { opacity: 1; }
.buttons button:hover { color: black; transform: translateY(-5px); }
.wide {
  grid-column: span 3;
  justify-self: center;
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a, #333) !important;
  color: #fff !important;
  font-size: 26px;
  padding: 25px;
  border: 2px solid #666 !important;
}
.wide:hover {
  background: linear-gradient(135deg, #333, #555) !important;
  color: #fff !important;
}

#optionsContainer { margin: 25px 0; }
.option:hover { background: rgba(80, 80, 80, 0.8); border-color: #ff9900; }
.option input[type="radio"] { margin-left: 15px; transform: scale(1.6); cursor: pointer; }
.option.selected { background: rgba(255, 153, 0, 0.15); border-color: #ff9900; }

#navigationButtons {
  display: flex;
  justify-content: space-between;
  margin-top: 35px;
  position: relative;
}
#navigationButtons button {
  padding: 14px 35px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  min-width: 120px;
}
#navigationButtons button.invisible { visibility: hidden; }

#prevBtn {
  background: linear-gradient(135deg, #555, #333);
  color: white;
  border: 2px solid #777;
  width: 120px;
}
#nextBtn, #submitBtn {
  background: linear-gradient(135deg, #ff9900, #ff6600);
  color: #000;
  border: 2px solid #ff9900;
  width: 120px;
}
#submitBtn { display: none; }
#prevBtn:hover { background: linear-gradient(135deg, #777, #555); }
#nextBtn:hover, #submitBtn:hover { background: linear-gradient(135deg, #ff6600, #ff9900); }

#progressContainer, #stageIndicator { text-align: center; color: #ff9900; font-weight: bold; }
#progressContainer { font-size: 20px; margin-top: 25px; }
#stageIndicator { font-size: 22px; margin-bottom: 15px; }

#resultContainer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 650px;
  background: rgba(20, 20, 20, 0.95);
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  z-index: 25;
  display: none;
  box-shadow: 0 0 40px rgba(255, 153, 0, 0.3);
  border: 2px solid #ff9900;
  overflow-y: auto;
  max-height: 90vh;
}
#resultContainer.show { display: block; animation: fadeInResult 0.8s ease-in-out; }
@keyframes fadeInResult {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

#resultTitle {
  font-size: 34px;
  margin-bottom: 30px;
  color: #ffcc00;
  text-shadow: 0 0 5px rgba(255,255,255,0.4);
}
#resultMessage {
  font-size: 26px;
  margin-bottom: 20px;
  line-height: 1.6;
  text-shadow: 0 0 3px rgba(255,255,255,0.3);
}
.success { color: #4cff00; font-weight: bold; }
.failure { color: #ff6b6b; font-weight: bold; }
#finalScore {
  font-size: 30px;
  margin: 15px 0;
  color: #ffcc00;
  text-shadow: 0 0 4px rgba(255,221,68,0.5);
}
#cumulativeScore {
  font-size: 24px;
  margin: 15px 0;
  color: #4cff00;
  text-shadow: 0 0 4px rgba(76,255,0,0.5);
}
#maradonaImage {
    max-width: 80%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    margin-top: 20px;
    border-radius: 10px;
}

.stats-card, .instagram-prompt {
  background: rgba(30, 30, 30, 0.8);
  border: 2px solid #ff9900;
  border-radius: 15px;
  padding: 25px;
  margin-top: 40px;
  display: none;
}
.stats-card { padding: 15px; margin: 15px 0; }
.stats-title, .instagram-prompt h3 {
  color: #ffcc00;
  font-weight: bold;
  margin-bottom: 15px;
  font-size: 24px;
}
.stats-content {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}
.stat-item { text-align: center; margin: 10px; min-width: 100px; }
.stat-value { font-size: 24px; font-weight: bold; color: #ffcc00; }
.stat-label { font-size: 16px; color: #aaa; }

.stage-progress { display: flex; justify-content: center; margin: 20px 0; }
.stage-dot { width: 16px; height: 16px; border-radius: 50%; background: #444; margin: 0 8px; border: 2px solid #555; }
.stage-dot.active { background: #ff9900; border-color: #ffcc00; }
.stage-dot.completed { background: #4cff00; border-color: #7fff4c; }

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  color: white;
  text-decoration: none;
  padding: 15px 30px;
  background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
  border-radius: 50px;
  transition: all 0.3s ease;
}
.instagram-link:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(225, 48, 108, 0.6); }
.instagram-link i { font-size: 32px; }

#restartBtn, #backButton {
  padding: 18px 50px;
  font-size: 24px;
  color: #000;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 35px;
  transition: all 0.3s;
  font-weight: bold;
  display: inline-block;
  background: linear-gradient(135deg, #ff9900, #ff6600);
  border: 2px solid #ffcc00;
}
#restartBtn:hover, #backButton:hover { transform: scale(1.05); background: linear-gradient(135deg, #ff6600, #ff9900); }
#backButton { background: linear-gradient(135deg, #555, #333); color: white; border: 2px solid #777; margin-top: 20px; }

.footer { text-align: center; padding: 25px 0; margin-top: 30px; border-top: 1px solid #444; color: #777; font-size: 18px; }

#chatIcon {
  position: fixed; bottom: 30px; left: 30px; width: 60px; height: 60px;
  background: linear-gradient(135deg, #ff9900, #ff6600);
  border-radius: 50%; display: flex; justify-content: center; align-items: center;
  cursor: pointer; z-index: 50; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: all 0.3s ease;
}
#chatIcon:hover { transform: scale(1.1); }
#chatIcon i { font-size: 28px; color: #000; }

#chatBadge {
  position: absolute; top: -5px; right: -5px; background: #ff0000; color: white; border-radius: 50%;
  width: 25px; height: 25px; display: flex; justify-content: center; align-items: center;
  font-size: 14px; font-weight: bold;
}

#chatContainer {
  position: fixed; bottom: 100px; left: 30px; width: 350px; height: 450px;
  background: rgba(30, 30, 30, 0.95); border-radius: 15px; border: 2px solid #ff9900;
  z-index: 50; display: flex; flex-direction: column; box-shadow: 0 5px 30px rgba(0,0,0,0.5);
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: all 0.3s ease;
}
#chatContainer.open { transform: translateY(0); opacity: 1; pointer-events: all; }

#chatHeader {
  padding: 15px; background: rgba(40, 40, 40, 0.9); border-bottom: 1px solid #444;
  border-top-left-radius: 15px; border-top-right-radius: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
#chatTitle { font-size: 20px; font-weight: bold; color: #ffcc00; }
#onlineCount { background: rgba(255, 153, 0, 0.2); padding: 5px 10px; border-radius: 15px; font-size: 14px; }
#closeChat { background: none; border: none; color: #aaa; font-size: 20px; cursor: pointer; transition: color 0.3s; }
#closeChat:hover { color: #ff9900; }

#chatMessages {
  flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; max-height: 300px;
}
.message { max-width: 80%; padding: 10px 15px; border-radius: 15px; font-size: 16px; position: relative; word-wrap: break-word; }
.received { background: rgba(60, 60, 60, 0.7); align-self: flex-start; border-bottom-left-radius: 5px; }
.sent { background: linear-gradient(135deg, #ff9900, #ff6600); color: #000; align-self: flex-end; border-bottom-right-radius: 5px; }
.sender { font-size: 12px; font-weight: bold; margin-bottom: 3px; color: #ffcc00; }

/* Upgraded Chat Input and Emoji Picker Styles */
#chatInputContainer {
  padding: 10px; display: flex; gap: 10px; border-top: 1px solid #444; align-items: center; position: relative;
}
#emojiPicker {
  position: absolute; bottom: 60px; right: 10px; background: #2a2a2a; border: 1px solid #555; border-radius: 10px;
  padding: 10px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; max-height: 150px; overflow-y: auto;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
}
#emojiPicker.hidden { display: none; }
#emojiPicker span { cursor: pointer; font-size: 20px; padding: 5px; border-radius: 5px; transition: background 0.2s; }
#emojiPicker span:hover { background: #444; }

#emojiBtn { background: none; border: none; color: #aaa; font-size: 24px; cursor: pointer; padding: 5px; }
#emojiBtn:hover { color: #ffcc00; }

#chatInput {
  flex: 1; padding: 12px 15px; background: rgba(50, 50, 50, 0.7); border: 1px solid #555;
  border-radius: 25px; color: white; font-size: 16px;
}
#chatInput:focus { outline: none; border-color: #ff9900; }

#sendMessage {
  padding: 10px 15px; border-radius: 25px; background: linear-gradient(135deg, #ff9900, #ff6600);
  border: none; color: #000; font-size: 16px; font-weight: bold; cursor: pointer;
  display: flex; justify-content: center; align-items: center; gap: 5px; transition: all 0.3s;
}
#sendMessage:hover { transform: scale(1.05); box-shadow: 0 0 10px rgba(255, 153, 0, 0.5); }

.watermark, .scroll-down-btn, .modal { position: fixed; }
.watermark { top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" opacity="0.03"><text x="50%" y="50%" font-family="Arial" font-size="24" text-anchor="middle" fill="white"></text></svg>'); background-repeat: repeat; }

.scroll-down-btn {
  bottom: 30px; right: 30px; width: 50px; height: 50px; background: rgba(255, 153, 0, 0.8);
  border-radius: 50%; display: flex; justify-content: center; align-items: center;
  cursor: pointer; z-index: 40; opacity: 0; transition: opacity 0.3s;
}
.scroll-down-btn.visible { opacity: 1; }
.scroll-down-btn i { font-size: 24px; color: #000; }

.modal {
  top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7);
  display: flex; justify-content: center; align-items: center; z-index: 10000;
}
.modal-content {
  background: rgba(30, 30, 30, 0.95); padding: 30px; border-radius: 15px; border: 2px solid #ff9900;
  width: 90%; max-width: 400px; text-align: center;
}
.modal-content h3 { color: #ffcc00; margin-bottom: 20px; font-size: 24px; }
#usernameInput {
  width: 100%; padding: 15px; margin: 15px 0; background: rgba(50, 50, 50, 0.7);
  border: 1px solid #555; border-radius: 8px; color: white; font-size: 18px; text-align: center;
}
#saveUsername {
  padding: 12px 25px; font-size: 18px; background: linear-gradient(135deg, #ff9900, #ff6600);
  color: #000; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: all 0.3s;
}
#saveUsername:hover { transform: scale(1.05); }

/* Story & Content Modals */
.story-modal, .content-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 10001; display: none; justify-content: center; align-items: center;
}
.story-modal { background-color: rgba(0, 0, 0, 0.9); }
.content-modal { background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); z-index: 10002; padding: 20px; }
.story-modal.show, .content-modal.show { display: flex; }

.story-container, .content-modal-box { position: relative; width: 95%; background-color: #111; border-radius: 15px; overflow: hidden; }
.story-container { max-width: 450px; height: 90vh; max-height: 800px; display: flex; flex-direction: column; }
.content-modal-box {
  background: rgba(30, 30, 30, 0.95); border: 1px solid #ff9900; padding: 30px 40px;
  max-width: 800px; max-height: 80vh; overflow-y: auto; text-align: right; color: #eee;
}

.story-progress-bars {
  position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; height: 3px; z-index: 2;
}
.progress-bar { flex: 1; background-color: rgba(255, 255, 255, 0.3); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0; background-color: #fff; }
.progress-bar.active .progress-bar-fill { transition: width 5s linear; width: 100%; }

.story-image-container { flex-grow: 1; display: flex; align-items: center; justify-content: center; }
.story-image { max-width: 100%; max-height: 100%; object-fit: contain; }

.story-actions { position: absolute; bottom: 20px; left: 20px; display: flex; gap: 15px; align-items: center; color: white; z-index: 2; }
.story-like-btn, .story-share-btn {
  background: none; border: none; color: white; font-size: 24px; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.story-like-btn .fa-heart { transition: color 0.2s, transform 0.2s; }
.story-like-btn.liked .fa-heart { color: #ff3b5c; transform: scale(1.1); font-weight: 900; }
.like-count { font-size: 16px; font-weight: bold; }

.story-close-btn, .content-modal-close { position: absolute; top: 15px; background: none; border: none; color: white; font-size: 30px; cursor: pointer; z-index: 3; }
.story-close-btn { right: 15px; }
.content-modal-close { left: 20px; }

.story-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.2);
  border: none; color: white; font-size: 32px; cursor: pointer; z-index: 2; padding: 10px 5px; border-radius: 5px;
}
.story-nav-btn.prev { left: 5px; }
.story-nav-btn.next { right: 5px; }

.content-modal-box h2 { color: #ffcc00; text-align: center; margin-bottom: 25px; }
.content-modal-box h4 { color: #ff9900; margin-top: 20px; margin-bottom: 5px; }
.content-modal-box p, .content-modal-box li { line-height: 1.8; margin-bottom: 10px; color: #ccc; }
.content-modal-box ul { padding-right: 20px; }