/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Prevents text from being highlighted when users rapidly tap the screen */
    -webkit-tap-highlight-color: transparent; 
    -webkit-user-select: none;
    user-select: none; 
}

body {
    background-color: #f4f4f9;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Respects the "notch" on modern iPhones and Androids */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

header {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 1.25rem 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

main {
    flex: 1;
    padding: 1.5rem 1rem;
    width: 100%;
    /* Limits width on desktop so it doesn't stretch awkwardly */
    max-width: 600px; 
    margin: 0 auto;
}

.tool-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.tool-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.tool-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Mobile-friendly touch targets (min 44px tall) */
.primary-btn {
    background-color: #007aff; /* iOS Blue */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.primary-btn:active {
    background-color: #005bb5;
}

/* --- APP LOADER STYLES --- */
.app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1a1a1a; 
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; 
  
  /* IMPORTANT: Change the 3s to match the EXACT length of your GIF! */
  animation: fadeOutLoader 0.5s ease-in-out forwards;
  animation-delay: 3s; 
}

/* Forces the GIF to stretch perfectly edge-to-edge */
.fullscreen-gif {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Use 'contain' instead of 'cover' if the GIF gets cropped too much */
}

@keyframes fadeOutLoader {
  0% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; 
  }
}