/* ============================================
   META PROMPT BUILDER PRO - STYLES
   ============================================ */
/* Header Font - Archivo Italic Medium */
  .header-title {
      font-family: 'Archivo', 'Inter', sans-serif;
      font-weight: 500;
      font-style: italic;
      letter-spacing: 0.02em;
  }
   
/* CSS Variables */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #1f1f1f;
    --purple-glow: #8b5cf6;
    --purple-light: #a78bfa;
    --cyan-glow: #06b6d4;
    --cyan-light: #22d3ee;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #fafafa;
    min-height: 100vh;
}

/* Glass Effects */
.glass {
    background: rgba(31, 31, 31, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-light {
    background: rgba(31, 31, 31, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glow Effects */
.glow-purple {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.glow-cyan {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Form Elements */
textarea, input, select {
    transition: all 0.3s ease;
    background: rgba(31, 31, 31, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fafafa;
}

textarea:focus, input:focus, select:focus {
    background: rgba(31, 31, 31, 0.9);
    border-color: var(--purple-glow);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), 0 0 20px rgba(139, 92, 246, 0.3);
    outline: none;
    transform: translateY(-1px);
}

/* Category Cards */
.category-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.4s;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.5);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.1));
    border-color: var(--purple-glow);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Text Gradient */
.gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Text Gradient */
.gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle Gradient - 60% Reduced Intensity */
.gradient-text-subtle {
    background: linear-gradient(135deg, #b8a0f5 0%, #6bc9de 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: rgba(31, 31, 31, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--purple-glow);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Progress Ring */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease;
}

/* Metric Cards */
.metric-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
}

.metric-card:hover::before {
    opacity: 1;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--purple-glow);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    transition: width 0.5s ease;
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Prompt Output */
#prompt-output {
    background: rgba(10, 10, 10, 0.8);
    color: #fafafa;
    resize: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* Info Button */
.info-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.info-button:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
}

.info-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tooltip */
.tooltip {
    position: absolute;
    bottom: -35px;
    right: 0;
    background: rgba(139, 92, 246, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.info-button:hover .tooltip {
    opacity: 1;
}

/* Smart Fill Info */
.smart-fill-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(139, 92, 246, 0.5);
    color: rgba(139, 92, 246, 0.8);
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    position: relative;
    margin-right: 6px;
    transition: all 0.3s ease;
}

.smart-fill-info:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.8);
    transform: scale(1.1);
}

.smart-fill-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(139, 92, 246, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    line-height: 1.4;
}

.smart-fill-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border: 6px solid transparent;
    border-top-color: rgba(139, 92, 246, 0.95);
}

.smart-fill-info:hover .smart-fill-tooltip {
    opacity: 1;
}

/* Back Button */
.back-button {
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateX(-2px);
}
/* AI Button Used State */
.ai-used {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.3)) !important;
    border-color: rgba(34, 197, 94, 0.6) !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4) !important;
}

.ai-used:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(16, 185, 129, 0.4)) !important;
    border-color: rgba(34, 197, 94, 0.8) !important;
}
/* ============================================
   MODAL SYSTEM
   ============================================ */

/* All modals - hidden by default */
#welcome-modal,
#expand-modal,
#saved-prompts-modal,
#save-name-modal,
#save-warning-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
}

/* When modal is shown (modal-hidden class removed) */
#welcome-modal:not(.modal-hidden),
#expand-modal:not(.modal-hidden),
#saved-prompts-modal:not(.modal-hidden),
#save-name-modal:not(.modal-hidden),
#save-warning-modal:not(.modal-hidden) {
    display: flex !important;
}

/* ============================================
   MOBILE FIXES
   ============================================ */

/* Make all interactive elements work on mobile */
.category-card,
.tool-btn,
button,
.info-button,
#close-welcome-modal {
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.3);
    touch-action: manipulation;
    cursor: pointer;
    pointer-events: auto !important;
}

/* Fix iOS Safari click issues */
.category-card {
    position: relative;
    z-index: 1;
}

/* Ensure info button is clickable */
#info-button {
    z-index: 100;
    position: relative;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.5);
}

/* Fix header z-index for mobile */
header {
    z-index: 50;
}

/* Ensure category section is interactive */
#category-section {
    pointer-events: auto;
    z-index: 10;
}

/* Mobile modal scrolling */
@media (max-width: 768px) {
    #welcome-modal .glass,
    #expand-modal .glass,
    #saved-prompts-modal .glass,
    #save-name-modal .glass,
    #save-warning-modal .glass {
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Prevent iOS zoom on input focus */
input, textarea, select {
    font-size: 16px !important;
}
