
:root {
  /* Vibrant Color Palette */
  --primary: #7e3ff2;
  --primary-light: #9d6afc;
  --primary-dark: #5a1fb8;
  --secondary: #ff6b6b;
  --accent: #4ecdc4;
  --warning: #ffd166;
  --success: #06d6a0;
  
  /* Light Theme */
  --bg: linear-gradient(135deg, #f0f2f5 0%, #e6f7ff 100%);
  --card: #ffffff;
  --card-hover: #f8f9ff;
  --text: #1a1425;
  --text-light: #7a7490;
  --shadow: 0 8px 32px rgba(126, 63, 242, 0.1);
  --shadow-hover: 0 12px 48px rgba(126, 63, 242, 0.15);
  --border: rgba(126, 63, 242, 0.1);
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* DARK THEME */
:root[data-theme="dark"] {
  --bg: linear-gradient(135deg, #120f17 0%, #1a1a2e 50%, #16213e 100%);
  --card: #1a1325;
  --card-hover: #231a38;
  --text: #ffffff;
  --text-light: #b8a9cc;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 48px rgba(126, 63, 242, 0.2);
  --border: rgba(255, 255, 255, 0.1);
  --gradient: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Animated Background Elements */
.background-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  opacity: 0.1;
  animation: float 20s infinite linear;
}

.bubble:nth-child(1) { width: 100px; height: 100px; top: 10%; left: 10%; animation-delay: 0s; }
.bubble:nth-child(2) { width: 150px; height: 150px; top: 60%; left: 80%; animation-delay: -5s; }
.bubble:nth-child(3) { width: 80px; height: 80px; top: 80%; left: 20%; animation-delay: -10s; }
.bubble:nth-child(4) { width: 120px; height: 120px; top: 30%; left: 70%; animation-delay: -15s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(90deg); }
  50% { transform: translateY(0) rotate(180deg); }
  75% { transform: translateY(20px) rotate(270deg); }
}

/* Welcome Modal */
.welcome-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.welcome-content {
  max-width: 500px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.5s ease;
  background: var(--card);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
}

.welcome-header {
  margin-bottom: 30px;
}

.welcome-icon {
  font-size: 4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  display: inline-block;
}

.welcome-body {
  margin-bottom: 30px;
  line-height: 1.8;
  color: var(--text-light);
}

.notification-consent {
  margin: 25px 0;
  text-align: left;
  padding: 20px;
  background: rgba(126, 63, 242, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: 6px;
  margin-right: 12px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.checkbox-container input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark:after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.welcome-actions {
  margin-top: 30px;
}

/* Header */
.hdrPage {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 150;
}

:root[data-theme="dark"] .hdrPage {
  background: rgba(26, 19, 37, 0.8);
}

.hdr-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.brand-img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--primary);
  padding: 2px;
}

.brand-name {
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.hdr-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-icon {
  background: rgba(126, 63, 242, 0.1);
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 10px;
  border-radius: 12px;
  color: var(--primary);
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Layout */
.app-container {
  display: flex;
  gap: 25px;
  max-width: 1200px;
  margin: 25px auto;
  padding: 0 20px;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 20px;
  height: fit-content;
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.sidebar:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.logo h1 {
  font-size: 1.3rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px 0;
  font-weight: 700;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.3s ease;
  margin-bottom: 8px;
  font-weight: 500;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.nav-item.active, .nav-item:hover {
  background: var(--gradient);
  color: white;
  transform: translateX(5px);
}

.nav-item.active i, .nav-item:hover i {
  color: white;
}

/* Main content */
.main-content {
  flex: 1;
  min-height: 70vh;
}

.header {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  margin-bottom: 25px;
}

.search-bar {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.search-bar input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(126, 63, 242, 0.1);
  border-color: var(--primary);
}

.search-bar i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1.1rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--card);
  border-radius: 50px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

/* Cards & Feed */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 25px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-form {
  position: relative;
}

.post-form h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--text);
  font-size: 1.3rem;
}

.post-form h3 i {
  color: var(--primary);
}

.post-form textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
  background: var(--card);
  color: var(--text);
  resize: vertical;
  font-size: 16px;
  line-height: 1.6;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

.post-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: inset 0 2px 10px rgba(126, 63, 242, 0.1);
}

/* Buttons */
.submit-btn {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(126, 63, 242, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(126, 63, 242, 0.4);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Feed list */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}

.confession-card {
  padding: 25px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.confession-card:hover {
  background: var(--card-hover);
}

.confession-header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}

.confession-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(126, 63, 242, 0.3);
}

.confession-user {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.confession-time {
  color: var(--text-light);
  font-size: 14px;
}

.confession-content {
  margin-top: 15px;
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  padding: 15px;
  background: rgba(126, 63, 242, 0.03);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.confession-image {
  margin-top: 15px;
  border-radius: 16px;
  max-height: 400px;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow);
}
.footer-text{
  border: 1px solid var(--border);
  background-color: var(--card);
  padding: 10px;
}
.confession-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.confession-action {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  background: transparent;
  color: var(--text-light);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.confession-action:hover {
  background: rgba(126, 63, 242, 0.1);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Heart reaction styles */
.like-action {
  cursor: pointer;
  transition: all 0.3s ease;
}

.like-action.liked {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1) !important;
}

.like-action.liked i {
  color: #ff6b6b;
}

.like-action:hover {
  transform: scale(1.1);
}

/* Comments */
.comment {
  display: flex;
  gap: 15px;
  margin: 15px 0;
  padding: 15px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.comment:hover {
  box-shadow: var(--shadow);
  transform: translateX(5px);
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-content strong {
  color: var(--primary);
}

.comment-input {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  align-items: center;
}

.comment-input input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: all 0.3s ease;
}

.comment-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 63, 242, 0.1);
}

.comment-input button {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(126, 63, 242, 0.3);
}

.comment-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(126, 63, 242, 0.4);
}

/* Chat */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 600px;
  border-radius: 20px;
  overflow: hidden;
}

.chat-header {
  background: var(--gradient);
  color: white;
  padding: 25px;
  text-align: center;
}

.chat-header h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  padding: 20px;
  margin-bottom: 0;
  background: var(--bg);
}

.message {
  margin-bottom: 20px;
  display: flex;
  animation: messageSlide 0.3s ease;
}

.message.own {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 70%;
  padding: 15px 20px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  position: relative;
}

.message.own .message-bubble {
  background: var(--gradient);
  color: white;
}

.message-sender {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 5px;
  opacity: 0.9;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 5px;
}

.chat-input {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.chat-input input {
  flex: 1;
  padding: 15px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 63, 242, 0.1);
}

.chat-input button {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(126, 63, 242, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(126, 63, 242, 0.4);
}

/* Full view */
.full-view {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.full-view-content {
  width: 95%;
  max-width: 800px;
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  animation: scaleUp 0.3s ease;
}

.close-full-view {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
}

/* Emoji picker styles */
.emoji-picker {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px;
  z-index: 1000;
  box-shadow: var(--shadow-hover);
  max-width: 280px;
  backdrop-filter: blur(20px);
}

.emoji-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

.emoji-picker-header button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.3s ease;
}

.emoji-picker-header button:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.emoji-grid span {
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  font-size: 20px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-grid span:hover {
  background: var(--primary);
  transform: scale(1.2);
}

.emoji-btn {
  background: var(--gradient);
  border: none;
  border-radius: 12px;
  padding: 10px 15px;
  cursor: pointer;
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(126, 63, 242, 0.3);
}

.emoji-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(126, 63, 242, 0.4);
}

/* Post form emoji button */
#emojiButton {
  position: absolute;
  right: 20px;
  top: 80px;
  z-index: 10;
}

/* Progress */
.progress-container {
  margin-top: 15px;
  padding: 15px;
  background: rgba(126, 63, 242, 0.05);
  border-radius: 12px;
}

/* Utility */
.loading {
  padding: 40px;
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state img {
  margin-bottom: 20px;
  opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes messageSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
    gap: 20px;
  }
  
  .sidebar {
    width: 100%;
    position: static;
    height: auto;
  }
  
  .nav-menu {
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }
  
  .nav-item {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .hdr-inner {
    padding: 10px 15px;
  }
  
  .app-container {
    margin: 15px auto;
    padding: 0 15px;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-bar {
    max-width: 100%;
  }
  
  .user-menu {
    align-self: flex-start;
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .confession-actions {
    flex-wrap: wrap;
  }
  
  .confession-action {
    flex: 1 1 calc(50% - 10px);
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .welcome-content {
    padding: 30px 20px;
    margin: 10px;
  }
  
  .card {
    padding: 20px;
  }
  
  .confession-card {
    padding: 20px;
  }
  
  .chat-input {
    flex-direction: column;
    gap: 10px;
  }
  
  .chat-input button {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .sidebar {
    display: none;
  }
  
  .sidebar.active {
    display: block;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
