/* =======================
   PromptPilot Light Theme Styles
   ======================= */

/* ==== Root Variables ==== */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.98);
    --text-color: #2c3e50;
    --muted-text: #555;
    --border-color: #ddd;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    --radius: 10px;
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ==== Global Reset ==== */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background: linear-gradient(135deg, #eef2f7 0%, #ffffff 100%);
    color: var(--text-color);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Stars Layer */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('stars.png') repeat;
    z-index: -1; /* ✅ Behind everything */
    opacity: 0.25; /* ✅ Light effect */
    pointer-events: none;
}

/* Remove any conflicting overlays */
body::before { display: none; }

/* ==== Headings ==== */
h1, h2, h3, h4, h5, h6 {
    color: #000; /* ✅ Force dark headings */
    font-weight: 700;
    margin-bottom: 0.8rem;
}

/* ==== Layout Containers ==== */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

/* ==== Hero Section ==== */
.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-section h1 {
    font-size: 2.4rem;
}
.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--muted-text);
}

/* ==== Tool Grid ==== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* ==== Tool Card ==== */
.tool-card {
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.tool-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.tool-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}
.tool-card p {
    color: var(--muted-text);
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

/* Locked state */
.tool-card.locked {
    opacity: 0.6;
    filter: grayscale(0.3);
}
.tool-card.locked h2,
.tool-card.locked p {
    color: #888;
}

/* ==== Buttons ==== */
.tool-button,
.primary-button {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.tool-button:hover,
.primary-button:hover {
    background: linear-gradient(90deg, var(--primary-hover), var(--primary-color));
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}
.tool-card.locked .tool-button {
    background: #bbb;
    cursor: not-allowed;
    box-shadow: none;
}

/* Pro Badge */
.pro-badge {
    background: #ff4081;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* ==== Prompt Preview ==== */
.preview-area {
    margin-top: 1.5rem;
    background: #f8f8f8;
    color: #111;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid #ddd;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    max-height: 220px;
    overflow-y: auto;
}

/* ==== Forms ==== */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-color);
}
.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background: #fff;
    color: var(--text-color);
    box-sizing: border-box;
}
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* ==== Upgrade Banner ==== */
.upgrade-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.6s ease-out;
}
.upgrade-banner a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}
.upgrade-banner a:hover {
    text-decoration: underline;
}

/* ==== Footer ==== */
footer {
    text-align: center;
    color: var(--muted-text);
    font-size: 0.95rem;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* ==== Animations ==== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==== Responsive ==== */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section p { font-size: 1rem; }
    .tool-grid { gap: 1rem; }
}

/* =======================
   AI Learning – force readable form text on light cards
   ======================= */
.ai-learning,
.ai-learning * {
  color: #111827; /* readable default */
}

.ai-learning input,
.ai-learning select,
.ai-learning textarea,
.ai-learning button {
  color: #111827 !important;
  caret-color: #111827;
  background: #fff;
  border: 1px solid var(--border-color);
  -webkit-text-fill-color: #111827; /* Safari */
}

.ai-learning option {
  color: #111827 !important;
  background: #fff;
}

/* Placeholders */
.ai-learning ::placeholder {
  color: #6b7280; /* muted but visible */
  opacity: 1;     /* ensure not faded to invisible */
}

/* Autofill (Safari/Chrome) can force white text */
.ai-learning input:-webkit-autofill,
.ai-learning textarea:-webkit-autofill,
.ai-learning select:-webkit-autofill {
  -webkit-text-fill-color: #111827 !important;
  transition: background-color 99999s ease-in-out 0s; /* neutralize yellow */
  caret-color: #111827;
}
