/*────────────────────────────────────────────
  Modern Arabic Confessions App - Core Styles
────────────────────────────────────────────*/

/* ======= Theme Variables ======= */
:root {
  --primary: #6C63FF;     /* Modern purple */
  --primary-dark: #4D44DB;
  --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); 
  
  --radius: 12px;         /* Border radius */
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
}

/* ======= 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, h4, h5 {
  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(--primary-dark));
  border-radius: 3px;
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--text);
  margin-bottom: 1.5rem;
}

h3 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

h4 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ======= Form 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);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

textarea {
  width: 100%;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  font-size: 1.1rem;
  color: var(--text);
  resize: vertical;
  transition: var(--transition);
  font-family: 'Tajawal', sans-serif;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.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);
  width: 100%;
  gap: 0.5rem;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  font-size: 1.2rem;
}

/* ======= Character Counter ======= */
.char-counter {
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  margin-bottom: 0;
  transition: var(--transition);
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.error {
  color: var(--danger);
}

/* ======= Result Card ======= */
.result-card {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.result-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.result-header i {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: 1rem;
}

.result-body {
  margin-bottom: 1rem;
}

.result-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.result-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ======= Hash Container ======= */
.hash-container {
  display: flex;
  align-items: stretch;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.hash-input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: var(--primary);
  direction: ltr;
  min-width: 0;
}

.copy-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.copy-btn:hover {
  background: var(--primary-dark);
}

.copy-btn i {
  font-size: 1.2rem;
}

/* ======= Info Boxes ======= */
.publishing-info, .fb-info {
  background: rgba(33, 150, 243, 0.1);
  border-left: 4px solid var(--info);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.publishing-info h5, .fb-info h3 {
  color: var(--info);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.publishing-info p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.publishing-info p:last-child {
  margin-bottom: 0;
}

/* ======= Features Section ======= */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--darker);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ======= Disabled State ======= */
.disabled-message {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.disabled-message i {
  font-size: 2.5rem;
  color: var(--danger);
  margin-bottom: 1rem;
}

.disabled-message h3 {
  color: var(--danger);
}

/* ======= Toast Notification ======= */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 1000;
  max-width: 90%;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--danger);
}

.toast i {
  font-size: 1.2rem;
}

/* ======= Arabic Percentage Note ======= */
.arabic-percentage {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 1.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 152, 0, 0.1);
  border-radius: var(--radius);
  display: inline-block;
}

/* ======= Animations ======= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ======= Responsive Adjustments ======= */
@media (max-width: 768px) {
  body {
    padding: 1.5rem 1rem;
  }
  
  .container {
    padding: 0;
  }
  
  .card, .result-card {
    padding: 1.5rem;
  }
  
  textarea {
    min-height: 180px;
    font-size: 1rem;
  }
  
  .hash-container {
    flex-direction: column;
  }
  
  .hash-input {
    width: 100%;
    text-align: center;
  }
  
  .copy-btn {
    padding: 0.5rem;
    width: 100%;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .toast {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    max-width: calc(100% - 2rem);
  }
}