/* Generator Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
}

.nav-tabs {
    display: flex;
    gap: 5px;
    background: #f9fafb;
    padding: 4px;
    border-radius: 12px;
}

.nav-tab {
    padding: 8px 16px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: #1a1a1a;
    background: #ffffff;
}

.nav-tab.active {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 60px 20px;
    margin: 0 calc(-50vw + 50%);
    width: 100vw;
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

h1 {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.2;
}

.subtitle {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Tags Container and Badge Styles */
.tags-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    /* border-left: 4px solid #336699 !important; */
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
    letter-spacing: 0.025em;
}

select, input[type="text"], textarea {
    padding: 14px 16px;
    border: 2px solid #94A3B8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: #F0F9FF;
    color: #111827;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

select:focus, input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: #0891B2;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff;
}

.checkbox-item:hover {
    background: #f9fafb;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
}

.checkbox-item.checked {
    background: #eff6ff;
    border-color: #3b82f6;
}

.btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.btn:hover {
    background: #2d2d2d;
    transform: scale(1.05);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

.btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loading .loading-spinner {
    display: inline-block;
}

/* Large loading spinner for results area */
.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    color: #6b7280;
}

.loading-spinner-large {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #5EEAD4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.loading-spinner-container p {
    font-size: 16px;
    margin: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.results {
    margin-top: 32px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.results-header {
    margin-bottom: 16px;
}

.results-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.name-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.name-card {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    /* display: flex; */
    /* justify-content: space-between; */
    /* align-items: center; */
    transition: all 0.2s;
}

.name-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

.name-card.saved {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.name-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    /* display: flex;
    justify-content: space-between;
    align-items: start; */
}

.save-indicator {
    color: #fbbf24;
    font-size: 20px;
}

.name-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.name-meaning {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.card-actions {
    /* display: flex; */
    display: block;
    gap: 8px;
    margin-top: 16px;
}

.card-btn {
    /* flex: 1; */
    display: inline-block;
    margin-right: 8px;
    padding: 6px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.card-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.card-btn.saved {
    background: #fbbf24;
    color: white;
    border-color: #fbbf24;
}

.favorites-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.favorites-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-count {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.favorites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.favorite-chip {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.favorite-chip:hover {
    background: #f3f4f6;
}

.remove-favorite {
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.3);
    display: none;
    animation: slideUp 0.3s ease-out;
    z-index: 1000;
}

.toast.show {
    display: block;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.seo-content-section {
    margin-top: 80px;
    padding: 20px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid #e5e7eb;
}

.seo-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #4a5568;
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    margin-top: 48px;
    line-height: 1.3;
    text-align: left;
}

.seo-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    margin-top: 40px;
    line-height: 1.4;
    text-align: left;
}

.seo-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    margin-top: 32px;
    line-height: 1.5;
    text-align: left;
}

.seo-content p {
    margin-bottom: 24px;
    line-height: 1.7;
}

.seo-content ul {
    margin-bottom: 28px;
    padding-left: 28px;
}

.seo-content ol {
    margin-bottom: 28px;
    padding-left: 28px;
}

.seo-content li {
    margin-bottom: 8px;
    line-height: 1.6;
    padding-left: 4px;
}

.seo-content li:last-child {
    margin-bottom: 0;
}

.seo-content strong {
    font-weight: 600;
    color: #1f2937;
}

.seo-content em {
    font-style: italic;
    color: #4b5563;
}

.content-image {
    margin-top: 32px;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Card-based form sections */
.form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.optional-tag {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
    margin-left: 4px;
}

.detail-content-section {
    /* margin-top: 80px; */
    padding: 20px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid #e5e7eb;
}

.detail-content-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #1a1a1a;
    text-align: left;
}

.detail-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #4a5568;
}

.detail-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    margin-top: 40px;
    line-height: 1.3;
    text-align: left;
}

.detail-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    margin-top: 32px;
    line-height: 1.4;
    text-align: left;
}

.detail-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    margin-top: 24px;
    line-height: 1.5;
    text-align: left;
}

.detail-content p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.detail-content ul {
    margin-bottom: 24px;
    padding-left: 28px;
}

.detail-content ol {
    margin-bottom: 24px;
    padding-left: 28px;
}

.detail-content li {
    margin-bottom: 6px;
    line-height: 1.6;
    padding-left: 4px;
}

.detail-content li:last-child {
    margin-bottom: 0;
}

.detail-content strong {
    font-weight: 600;
    color: #1f2937;
}

.detail-content em {
    font-style: italic;
    color: #4b5563;
}

/* Breadcrumb Styles */
.breadcrumb {
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #718096;
}

.breadcrumb a {
    color: #7A9D96;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #5a7d76;
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #cbd5e0;
}

.breadcrumb .current {
    color: #2d3748;
    font-weight: 500;
}

/* Related Generators Section */
.related-section {
    margin-top: 60px;
    padding: 40px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #f1f5f9;
}

.related-section h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.related-card {
    background: #f8fafc;
    padding: 16px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.related-card:hover {
    background: #ffffff;
    border-color: #7A9D96;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.related-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.related-card p {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

/* Mobile Quick Generate Button */
.mobile-quick-generate {
    display: none;
    margin-bottom: 15px;
    text-align: center;
}

.quick-gen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #0891B2 0%, #0284C7 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.25);
}

.quick-gen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.35);
}

.quick-gen-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(8, 145, 178, 0.2);
}

.quick-gen-btn span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .main-container {
        padding: 0 16px;
    }

    /* Show mobile quick generate button */
    .mobile-quick-generate {
        display: block;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .header-content {
        justify-content: center;
    }
    
    .logo img {
        height: 32px;
    }
    
    .hero-section {
        text-align: center;
        padding: 30px 0;
    }
    
    h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 14px;
        margin-top: 8px;
    }
    
    .form-container {
        padding: 0;
    }

    .form-card {
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    select, input[type="text"], textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
    
    .btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .btn-secondary {
        width: 100%;
    }
    
    .results-container {
        margin-top: 24px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .name-card {
        padding: 14px;
    }
    
    .name-display {
        font-size: 16px;
    }
    
    .favorites-section {
        padding: 16px;
        margin: 20px -8px;
    }
    
    .checkbox-group {
        gap: 8px;
    }
    
    .checkbox-item {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .breadcrumb {
        padding: 10px 0;
        font-size: 12px;
    }
    
    .related-section {
        padding: 24px 16px;
        margin-top: 40px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-content-section {
        padding: 40px 0;
    }
    
    .detail-content-section h2 {
        font-size: 24px;
    }
    
    .detail-content {
        padding: 0 16px;
    }
    
    .seo-content {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 12px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .form-container {
        padding: 0px;
        margin: 0 -4px;
    }
    
    .hero-section {
        padding: 20px 0;
    }
    
    label {
        font-size: 13px;
    }
    
    .optional-tag {
        font-size: 11px;
    }
}