/* =============================================
   GLOBAL CSS RESET & BASE STYLES
   ============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  height: 100%;
  width: 100%;
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* =============================================
   LAYOUT STRUCTURE
   ============================================= */

/* Return to Top Button Styles */
.return-to-top-btn {
  display: inline-block;
  margin: 2rem auto 0 auto;
  padding: 0.75rem 1.5rem;
  background: #677eea;
  color: #fff;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(103, 126, 234, 0.15);
  transition: background 0.2s, transform 0.2s;
  text-align: center;
}
.return-to-top-btn:hover,
.return-to-top-btn:focus {
  background: #4b5fc1;
  transform: translateY(-3px) scale(1.05);
  color: #fff;
}
.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.main-flex {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  flex-direction: row;
  flex: 1;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* =============================================
   HEADER STYLES
   ============================================= */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

header h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 60px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.2rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.tagline {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  font-style: italic;
  letter-spacing: 0.5px;
  text-align: center;
}

/* Info trigger button */
.info-trigger {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.info-trigger:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.question-mark {
  color: white;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Beginner practice button */
.beginner-practice-btn {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  border: 1px solid #f9f9f9;
  border-radius: 9999px;
  color: white;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 1em;
  font-weight: 500;
  padding: 0.6em 0.4em;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
  margin-bottom: 0.5rem;
  display: block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.beginner-practice-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* =============================================
   MAIN CONTENT STYLES
   ============================================= */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

main p {
  padding: 0.5rem;
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 500;
}

main p label {
  display: block;
  margin-bottom: 0.25em;
}

main p input[type="number"],
main p input[type="text"] {
  display: block;
  width: 100%;
  max-width: 300px;
  margin-bottom: 0.1rem;
  font-size: 1em;
  padding: 0.4em;
  border-radius: 9999px;
  border: 1px solid #f9f9f9;
  font-family: "Montserrat", sans-serif;
}

/* Inline input with unit text */
#length-hold input[type="number"],
#length-between input[type="number"],
#poses input[type="number"],
#meditation-duration input[type="number"] {
  display: inline-block;
  width: 240px;
  margin-right: 8px;
  margin-bottom: 0;
  vertical-align: middle;
}

/* =============================================
   BUTTON STYLES
   ============================================= */

/* Preset buttons styling */
.preset-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 8px;
}

.preset-buttons button {
  background-color: #e8e8e8;
  color: #333;
  border: 1px solid #ccc;
  padding: 0.4em 0.8em;
  border-radius: 20px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 45px;
}

.preset-buttons button:hover {
  background-color: #6c63ff;
  color: white;
  border-color: #6c63ff;
  transform: translateY(-1px);
}

.preset-buttons button:active {
  transform: translateY(0);
}

.preset-buttons button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.3);
}

/* =============================================
   TIMER CONTAINER STYLES
   ============================================= */
#timerContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  /* border: 1px solid rgba(255, 255, 255, 0.2); */ /* Commenting out the border */
  transition: all 0.3s ease;
  width: 90%;
  max-width: 600px;
  height: 480px;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 480px;
}

#timerContainer:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

#clockFace {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

#progressCircle {
  transition: stroke 0.3s;
}

#progressCircle.running {
  stroke: #8b5cf6;
}

#progressCircle.paused {
  stroke: #ff9800;
}

#progressCircle.done {
  stroke: #4caf50;
}

.timerDisplay {
  font-size: 2em;
  font-weight: 700;
  color: #8b5cf6;
  text-align: center;
  font-family: "Montserrat", sans-serif;
}

#timer-btns {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  min-height: 126px;
}

#timer-btns button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

#start-yin {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

#start-yin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

#pauseBtn,
#resetBtn {
  background: rgba(255, 255, 255, 0.9);
  color: #8b5cf6;
  border: 2px solid rgba(139, 92, 246, 0.3);
}

#pauseBtn:hover,
#resetBtn:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #8b5cf6;
  transform: translateY(-2px);
}

#timer-btns button:focus {
  outline: none;
}

/* Disabled button styling for consistent layout */
#timer-btns button:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  border: none;
}

#timer-btns button:disabled:hover {
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: none;
  transform: none;
}

#start-yin:disabled,
#start-yin.disabled {
  background: linear-gradient(135deg, #d1d5db, #e5e7eb) !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none !important;
}

#start-yin:disabled:hover,
#start-yin.disabled:hover {
  background: linear-gradient(135deg, #d1d5db, #e5e7eb) !important;
  color: #9ca3af !important;
  box-shadow: none !important;
  transform: none !important;
}

/* =============================================
   FOOTER STYLES
   ============================================= */
footer {
  display: flex;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  padding: 1rem;
  color: white;
}

/* =============================================
   FORM CARD STYLES
   ============================================= */
.form-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  width: 90%;
  max-width: 600px;
  height: 480px;
  position: relative;
  flex-shrink: 0;
}

.form-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.help-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-decoration: none;
  scroll-behavior: smooth;
}

.help-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* =============================================
   SEO CONTENT SECTION
   ============================================= */
.seo-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  margin: 2rem auto;
  width: 90%;
  max-width: 1224px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3rem;
}

.content-container h2 {
  color: #333;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.content-container h3 {
  color: #4a5568;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.content-container p {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.feature-item {
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-item h3 {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  margin-top: 0;
}

.feature-item p {
  margin-bottom: 0;
  font-size: 1rem;
}

.content-container ol {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-container ol li {
  margin-bottom: 0.5rem;
}

.content-container strong {
  color: #4a5568;
  font-weight: 600;
}

@media (max-width: 768px) {
  .seo-content {
    padding: 2rem 1.5rem;
    margin: 1rem auto;
  }

  .content-container h2 {
    font-size: 1.8rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  margin: 2rem auto 1rem auto;
  width: 90%;
  max-width: 1224px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-container {
  padding: 2rem;
  max-width: 1224px;
  margin: 0 auto;
}

#contactHeader {
  text-align: center;
  color: #333;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

.contact-section > .contact-container > p {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.contact-item h3 {
  color: #667eea;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-family: "Montserrat", sans-serif;
}

.contact-item p {
  color: #666;
}

.contact-item a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Contact Form */
.contact-form {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.contact-form h3 {
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: #333;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-family: "Montserrat", sans-serif;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.contact-btn:active {
  transform: translateY(0);
}

/* =============================================
   TAB SYSTEM
   ============================================= */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 2rem 0;
  padding: 0 1rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Tab system - hide inactive tabs */
.tab-content {
  display: none !important;
}

/* Show active tab */
.main-flex .tab-content.active {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}

/* =============================================
   MEDITATION TIMER
   ============================================= */
#meditationContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  /* border: 1px solid rgba(255, 255, 255, 0.2); */ /* Commenting out the border */
  transition: all 0.3s ease;
  width: 90%;
  max-width: 600px;
  height: 480px;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 480px;
}

#meditationContainer:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

#meditationClock {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.timerDisplay {
  font-size: 2em;
  font-weight: 700;
  color: #8b5cf6;
  text-align: center;
  font-family: "Montserrat", sans-serif;
}

#meditation-status,
#timer-status {
  font-size: 1.1rem;
  color: #666;
  text-align: center;
  margin-bottom: 1.5rem;
  font-style: italic;
  min-height: 1.5rem;
}

#meditation-btns {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  min-height: 126px;
}

#meditation-btns button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

#startMeditation {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

#startMeditation:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

#pauseMeditation,
#resetMeditation {
  background: rgba(255, 255, 255, 0.9);
  color: #8b5cf6;
  border: 2px solid rgba(139, 92, 246, 0.3);
}

#pauseMeditation:hover,
#resetMeditation:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #8b5cf6;
  transform: translateY(-2px);
}

.meditation-settings {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.meditation-settings label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 18px;
  color: black;
  cursor: pointer;
}

.meditation-settings input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #8b5cf6;
}

/* =============================================
   MODAL OVERLAY STYLES
   ============================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  max-width: calc(
    675px + 300px + 1.5rem
  ); /* form-card width + timerContainer width + gap */
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
  color: #333;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.modal-body .info-item {
  background: rgba(139, 92, 246, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.modal-body .info-item h4 {
  color: #8b5cf6;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.modal-body .info-item p {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.modal-body .info-usage {
  background: rgba(67, 56, 202, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(67, 56, 202, 0.2);
}

.modal-body .info-usage h4 {
  color: #4338ca;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.modal-body .info-usage ol {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  padding-left: 1.2rem;
}

.modal-body .info-usage li {
  margin-bottom: 0.5rem;
}

.modal-body .info-usage li:last-child {
  margin-bottom: 0;
}

/* =============================================
   RESPONSIVE DESIGN - MOBILE STYLES
   ============================================= */

/* Medium tablets (1030px down to 901px) */
@media (max-width: 1030px) and (min-width: 901px) {
  header h1 {
    font-size: 48px;
    text-align: center;
  }

  .main-flex {
    gap: 1.5rem;
    padding: 0 3rem;
  }

  .form-card,
  #timerContainer,
  #meditationContainer {
    width: 90%;
    max-width: 430px;
    min-height: 380px;
    flex-shrink: 0;
  }

  .contact-section {
    margin: 2rem auto 1rem auto;
    width: 90%;
    max-width: 924px; /* 450px + 450px + 24px gap to match form/timer layout */
  }

  .contact-container {
    max-width: 924px;
  }

  /* Tab navigation for medium tablets */
  .tab-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 30px;
    min-width: 220px;
  }

  /* Input fields for wider form cards */
  main p input[type="number"],
  main p input[type="text"] {
    max-width: 400px;
  }
}

@media (max-width: 900px) and (min-width: 577px) {
  /* Ensure SVG elements are responsive */
  svg {
    max-width: 100%;
    height: auto;
  }
  /* Header adjustments */
  header {
    padding: 1rem 1rem;
  }

  header h1 {
    font-size: 40px;
    text-align: center;
  }

  /* Layout changes for mobile */
  body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
  }

  .main-flex {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
  }

  .main-flex .tab-content.active {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  /* Input adjustments */
  main p input[type="number"],
  main p input[type="text"] {
    max-width: 100%;
  }

  /* Reduce spacing in form card content for mobile */
  main p {
    padding: 0.25rem;
    margin-bottom: 0.5rem;
  }

  /* Card adjustments for mobile - MATCHING WIDTHS */
  .form-card,
  #timerContainer,
  #meditationContainer {
    width: 100%;
    max-width: 750px;
    min-width: auto;
    padding: 1rem;
    box-sizing: border-box;
    margin: 0 auto; /* Center the containers */
  }

  .form-card {
    height: auto;
  }

  /* Timer container mobile adjustments - AUTO HEIGHT for compact layout */
  #timerContainer,
  #meditationContainer {
    height: auto;
    min-height: 300px;
  }

  .form-card {
    height: auto;
  }

  #clockFace {
    width: 100%;
    height: auto;
    max-width: 160px;
    max-height: 160px;
    display: block;
    margin: 0 auto 0.2em auto;
  }

  .timerDisplay {
    font-size: 1.5em;
    margin-bottom: 0.2em;
  }

  /* Button adjustments */
  #timer-btns {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  #timer-btns button {
    width: 100%;
    padding: 1em;
    font-size: 1.1em;
  }

  /* Preset buttons mobile adjustments */
  .preset-buttons {
    justify-content: center;
    padding: 0;
  }

  /* Contact section mobile styles */
  .contact-section {
    margin: 1rem auto 0.5rem auto;
    width: 95%;
    max-width: 750px;
  }

  .contact-container {
    padding: 1rem;
    margin: 0 auto;
  }

  #contactHeader {
    font-size: 1.5rem;
  }

  .contact-methods {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-item {
    padding: 1rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  /* Tab and meditation styles for larger screens */
  .tab-nav {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0 2rem 0;
    padding: 0 1rem;
  }

  .tab-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 28px;
    min-width: 200px;
  }

  .main-flex .tab-content.active {
    flex-direction: column !important;
  }

  .timerDisplay {
    font-size: 1.5em;
  }

  #meditationClock {
    width: 100%;
    height: auto;
    max-width: 160px;
    max-height: 160px;
    display: block;
    margin: 0 auto 0.2em auto;
  }

  /* Button adjustments for meditation timer */
  #meditation-btns {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  #meditation-btns button {
    width: 100%;
    padding: 1em;
    font-size: 1.1em;
  }
}
/* Large phones (576px down to 481px) */
@media (min-width: 481px) and (max-width: 576px) {
  header {
    padding: 1.5rem;
  }
  header h1 {
    font-size: 36px;
    text-align: center;
  }

  .tagline {
    font-size: 16px;
  }

  /* Layout changes for large phones - FORCE VERTICAL STACKING */
  body {
    overflow-x: hidden;
  }

  .main-flex {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
  }

  .main-flex .tab-content.active {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  /* Tab navigation for large phones */
  .tab-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 2rem 0;
    padding: 0 1rem;
  }

  .tab-btn {
    width: 100%;
    max-width: 300px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 22px;
  }

  /* Input adjustments */
  main p input[type="number"],
  main p input[type="text"] {
    max-width: 100%;
  }

  main p {
    font-size: 17px;
    padding: 0.25rem;
  }

  .form-card,
  #timerContainer,
  #meditationContainer {
    width: 100%;
    max-width: 550px;
    min-width: auto;
    margin: 0 auto;
    padding: 1rem;
    height: auto;
    min-height: 350px;
  }

  #clockFace {
    width: 100%;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    display: block;
    margin: 0 auto 0.2em auto;
  }

  .timerDisplay {
    font-size: 1.4em;
    margin-bottom: 0.15em;
  }

  /* Button adjustments */
  #timer-btns,
  #meditation-btns {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  #timer-btns button,
  #meditation-btns button {
    width: 100%;
    padding: 1em;
    font-size: 1.05em;
  }

  #meditationClock {
    width: 100%;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    display: block;
    margin: 0 auto 0.2em auto;
  }

  /* Contact section - match form/timer containers */
  .contact-section {
    margin: 1rem auto 0.5rem auto;
    width: 95%;
    max-width: 550px;
  }

  .contact-container {
    padding: 1rem;
  }

  #contactHeader h2 {
    font-size: 1.4rem;
  }

  .contact-form {
    padding: 1.25rem;
  }

  .contact-methods {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-item {
    padding: 1rem;
  }

  /* Preset buttons */
  .preset-buttons {
    justify-content: center;
    padding: 0;
  }

  .timerDisplay {
    font-size: 1.4em;
  }

  #meditationClock {
    width: 100%;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    display: block;
    margin: 0 auto 0.2em auto;
  }
}

/* Small phones (480px down to 321px) */
@media (min-width: 321px) and (max-width: 480px) {
  header {
    padding: 1rem 2rem;
  }

  header h1 {
    font-size: 32px;
    text-align: center;
  }

  .tagline {
    font-size: 18px;
    margin-bottom: 0.5rem;
  }
  /* Layout changes for small phones - FORCE VERTICAL STACKING */
  body {
    overflow-x: hidden;
  }

  .main-flex {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
  }

  .main-flex .tab-content.active {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  /* Tab buttons for very small screens */
  .tab-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0rem 0 2rem 0;
    padding: 0 0.5rem;
  }

  .tab-btn {
    width: 100%;
    max-width: 250px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 20px;
  }

  /* Input adjustments */
  main p input[type="number"],
  main p input[type="text"] {
    max-width: 100%;
  }

  main p {
    font-size: 16px;
    padding: 0.25rem;
  }

  .form-card,
  #timerContainer,
  #meditationContainer {
    width: 95%;
    max-width: 400px;
    min-width: auto;
    margin: 0 auto;
    padding: 0.75rem;
  }

  #clockFace {
    width: 100%;
    height: auto;
    max-width: 130px;
    max-height: 130px;
    display: block;
    margin: 0 auto 0.1em auto;
  }

  .timerDisplay {
    font-size: 1.2em;
    margin-bottom: 0.1em;
  }

  /* Contact section - match form/timer containers */
  .contact-section {
    margin: 1rem auto 0.5rem auto;
    width: 90%;
    max-width: 400px;
  }

  .contact-container {
    padding: 0.75rem;
  }

  #contactHeader {
    font-size: 1.3rem;
  }

  .contact-form {
    padding: 1rem;
  }

  .timerDisplay {
    font-size: 1.2em;
  }

  #meditationClock {
    width: 100%;
    height: auto;
    max-width: 130px;
    max-height: 130px;
    display: block;
    margin: 0 auto 0.1em auto;
  }

  /* Modal responsiveness for small screens */
  .modal-content {
    max-width: 95%;
    margin: 1rem;
  }

  .modal-body .info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .info-trigger {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
  }

  .question-mark {
    font-size: 16px;
  }

  .beginner-practice-btn {
    font-size: 0.9em;
    padding: 0.35em;
  }

  .beginner-modal {
    max-width: 95%;
  }

  .pose-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .pose-number {
    margin-bottom: 0.5rem;
  }
}
/* Very small phones (320px and down) */
@media (max-width: 320px) {
  header {
    padding: 0.5rem 2rem;
  }
  header h1 {
    font-size: 24px;
    text-align: center;
  }

  .tagline {
    font-size: 13px;
    margin-bottom: 0.5rem;
  }

  main p {
    font-size: 15px;
    padding: 0.2rem;
  }

  /* Layout changes for very small screens - FORCE VERTICAL STACKING */
  body {
    overflow-x: hidden;
  }

  .main-flex {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 0.5rem;
  }

  .main-flex .tab-content.active {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  /* Input adjustments */
  main p input[type="number"],
  main p input[type="text"] {
    max-width: 100%;
  }

  .form-card,
  #timerContainer,
  #meditationContainer {
    width: 100%;
    max-width: 310px;
    min-width: auto;
    margin: 0 auto;
    padding: 0.5rem;
    height: auto;
    min-height: 300px;
    box-sizing: border-box;
  }

  #clockFace {
    width: 100%;
    height: auto;
    max-width: 110px;
    max-height: 110px;
    display: block;
    margin: 0 auto 0.1em auto;
  }

  .timerDisplay {
    font-size: 1.1em;
    margin-bottom: 0.1em;
  }

  /* Button adjustments */
  #timer-btns {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  #timer-btns button {
    width: 100%;
    padding: 0.8em;
    font-size: 1em;
  }

  /* Meditation timer buttons */
  #meditation-btns {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  #meditation-btns button {
    width: 100%;
    padding: 0.8em;
    font-size: 1em;
  }

  /* Contact section - match form/timer containers */
  .contact-section {
    margin: 1rem auto 0.5rem auto;
    width: 95%;
    max-width: 300px;
  }

  .contact-container {
    padding: 0.75rem;
  }

  #contactHeader {
    font-size: 1.2rem;
  }

  .contact-form {
    padding: 0.75rem;
  }

  #meditationClock {
    width: 100%;
    height: auto;
    max-width: 110px;
    max-height: 110px;
    display: block;
    margin: 0 auto 0.1em auto;
  }

  .modal-content {
    max-width: 98%;
    margin: 0.5rem;
  }

  .info-trigger {
    width: 32px;
    height: 32px;
  }

  .question-mark {
    font-size: 14px;
  }

  .beginner-practice-btn {
    font-size: 0.8em;
    padding: 0.3em;
  }

  /* Tab buttons for very small screens */
  .tab-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem 0;
    padding: 0 0.5rem;
  }

  .tab-btn {
    width: 100%;
    max-width: 250px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 20px;
  }
}
