/* ========================================
   📝 TEXT CASE CONVERTER - CSS
   Index.html Theme ke According
======================================== */

/* ✅ Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Theme - Same as Index.html */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* ========================================
   ⬅️ BACK BUTTON (Same as Index.html)
======================================== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--card-bg);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.back-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.5s ease;
}

.back-btn:hover::before {
  left: 100%;
}

.back-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.back-btn:active {
  transform: translateX(-3px) scale(0.98);
}

/* ========================================
   📦 MAIN CONTAINER
======================================== */
.container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.6s ease;
}

.container h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

.container > p {
  font-size: 1rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ========================================
   📝 INPUT BOX
======================================== */
.input-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* Textarea */
#textInput {
  width: 100%;
  min-height: 150px;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  background: var(--bg-color);
  resize: vertical;
  line-height: 1.6;
}

#textInput:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background: white;
}

#textInput::placeholder {
  color: var(--text-light);
}

/* Scrollbar for textarea */
#textInput::-webkit-scrollbar {
  width: 8px;
}

#textInput::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 8px;
}

#textInput::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 8px;
}

#textInput::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Label */
.input-box label {
  font-weight: 600;
  color: var(--text-color);
  font-size: 1rem;
}

/* Select Dropdown */
#caseType {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  background: var(--bg-color);
  cursor: pointer;
  color: var(--text-color);
  font-weight: 500;
}

#caseType:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background: white;
}

#caseType:hover {
  border-color: var(--primary-color);
}

/* ========================================
   📝 CONVERT BUTTON
======================================== */
#convertBtn {
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

#convertBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

#convertBtn:hover::before {
  left: 100%;
}

#convertBtn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

#convertBtn:active {
  transform: translateY(-1px);
}

#convertBtn:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
}

/* ========================================
   📝 TEXT OUTPUT SECTION
======================================== */
.text-output {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.text-output:empty::after {
  content: '📝 Converted text will appear here...';
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  text-align: center;
}

/* Message Paragraph */
.text-output > p {
  color: var(--text-light);
  text-align: center;
  margin: auto;
  font-style: italic;
}

/* ========================================
   📝 TAG CONTAINER (Result Box)
======================================== */
.tag-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid var(--border-color);
  border-left: 4px solid var(--success-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  animation: slideIn 0.5s ease;
}

.tag-container:hover {
  border-color: var(--success-color);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tag-container p {
  flex: 1;
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.7;
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ========================================
   📋 COPY BUTTON
======================================== */
.copy-btn {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.copy-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.copy-btn:hover::before {
  left: 100%;
}

.copy-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

.copy-btn:active {
  transform: translateY(0) scale(0.98);
}

.copy-btn.copied {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
  animation: successPulse 0.5s ease;
}

/* ========================================
   📱 RESPONSIVE - TABLETS (640px+)
======================================== */
@media (min-width: 640px) {
  .container h1 {
    font-size: 2.25rem;
  }
}

/* ========================================
   💻 RESPONSIVE - DESKTOP (768px+)
======================================== */
@media (min-width: 768px) {
  body {
    padding: 3rem 2rem;
  }

  .container {
    padding: 3rem 2.5rem;
  }

  .container h1 {
    font-size: 2.5rem;
  }

  .container > p {
    font-size: 1.1rem;
  }

  #textInput {
    min-height: 180px;
  }

  .text-output {
    padding: 2rem;
    min-height: 180px;
  }

  .tag-container p {
    font-size: 1.05rem;
  }
}

/* ========================================
   🖥️ RESPONSIVE - LARGE DESKTOP (1024px+)
======================================== */
@media (min-width: 1024px) {
  .container h1 {
    font-size: 3rem;
  }
}

/* ========================================
   📱 MOBILE SPECIFIC
======================================== */
@media (max-width: 640px) {
  .tag-container {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-btn {
    width: 100%;
  }
}

/* ========================================
   ✨ ANIMATIONS
======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ========================================
   ♿ ACCESSIBILITY
======================================== */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/*Google Ads*/
.ad-sidebar {
  width: 100%; /* Full on mobile */
  max-width: 300px; /* Sidebar size on desktop */
  margin: 20px auto; /* Center it */
  text-align: center;
  border-radius: 8px;
}

/* ========================================
   📝 BLOG CTA
======================================== */
.blog-cta {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
}

.blog-cta-content h3 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.blog-cta-content p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.blog-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.blog-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
