/*────────────────────────────────────────────
  post_style.css - Single Post View Styles
────────────────────────────────────────────*/

/* ======= Theme Variables ======= */
:root {
  --primary:   #6C63FF;    /* Modern purple */
  --secondary: #4D44DB;    /* Darker purple */
  --success:   #4CAF50;    /* Green */
  --danger:    #F44336;    /* Red */
  --warning:   #FF9800;    /* Orange */
  --info:      #2196F3;    /* Blue */
  --dark:      #1A1A2E;    /* Deep blue */
  --darker:    #16213E;    /* Darker blue */
  --light:     #F5F5F5;    /* Light gray */
  --text:      #E6E6E6;    /* Light text */
  --muted:     #B8B8B8;    /* Muted text */
  --border:    rgba(255,255,255,0.1); /* Subtle border */
  
  --radius:    12px;       /* Border radius */
  --shadow:    0 8px 32px rgba(0, 0, 0, 0.2); /* Soft shadow */
  --transition: all 0.3s ease; /* Smooth transitions */
}

/* ======= Base Styles ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ======= Typography ======= */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--primary);
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 3px;
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--text);
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* ======= Card Styles ======= */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.card {
  background: var(--darker);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.confession-content {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  white-space: pre-line;
}

.meta-info {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-item i {
  color: var(--primary);
}

/* ======= Button Styles ======= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.5rem;
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  font-size: 1.2rem;
}

/* ======= Reactions Styles ======= */
.reactions-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.reactions-title {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reactions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.reaction-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.reaction-btn:hover {
  background: rgba(108, 99, 255, 0.2);
}

.reaction-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.reaction-count {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ======= Not Found Styles ======= */
.not-found {
  text-align: center;
  padding: 2rem;
}

.not-found-icon {
  font-size: 4rem;
  color: var(--danger);
  margin-bottom: 1rem;
}

/* ======= Responsive Adjustments ======= */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .meta-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  .reactions-container {
    justify-content: center;
  }
}

/* ======= Animations ======= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}
