/**
 * Baby Name Generator Styles
 * Prefix: bng- (baby name generator)
 */

/* ==========================================================================
   Base Container
   ========================================================================== */

.bng-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================================================
   Header
   ========================================================================== */

.bng-header {
    text-align: center;
    margin-bottom: 40px;
}

.bng-title {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.bng-subtitle {
    font-size: 18px;
    color: #666;
}

/* ==========================================================================
   Progress Indicator
   ========================================================================== */

.bng-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.bng-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.bng-progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.bng-progress-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.bng-progress-step.active .bng-progress-number {
    background: #667eea;
    color: white;
}

.bng-progress-step.completed .bng-progress-number {
    background: #4ade80;
    color: white;
}

.bng-progress-label {
    font-size: 12px;
    color: #999;
    text-align: center;
}

.bng-progress-step.active .bng-progress-label {
    color: #667eea;
    font-weight: 600;
}

/* ==========================================================================
   Form Container
   ========================================================================== */

.bng-form-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.bng-step-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.bng-field {
    margin-bottom: 30px;
}

.bng-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.bng-field-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

/* ==========================================================================
   Radio Groups
   ========================================================================== */

.bng-radio-group {
    display: flex;
    gap: 15px;
}

.bng-radio-option {
    flex: 1;
    cursor: pointer;
}

.bng-radio-option input[type="radio"] {
    display: none;
}

.bng-radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.bng-radio-option:hover .bng-radio-content {
    border-color: #667eea;
}

.bng-radio-option.active .bng-radio-content {
    border-color: #667eea;
    background: #f0f4ff;
}

.bng-radio-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.bng-radio-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   Culture Options (REMOVED - kept for backwards compatibility)
   ========================================================================== */

.bng-culture-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bng-culture-option {
    cursor: pointer;
}

.bng-culture-option input[type="radio"] {
    display: none;
}

.bng-culture-content {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.bng-culture-option:hover .bng-culture-content {
    border-color: #667eea;
}

.bng-culture-option.active .bng-culture-content {
    border-color: #667eea;
    background: #f0f4ff;
}

.bng-culture-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bng-culture-header strong {
    font-size: 16px;
    color: #333;
}

.bng-badge {
    padding: 4px 8px;
    background: #fbbf24;
    color: #78350f;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.bng-culture-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.bng-culture-examples {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */

.bng-select,
.bng-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.bng-select:focus,
.bng-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==========================================================================
   Numerology Grid
   ========================================================================== */

.bng-number-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.bng-number-btn {
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bng-number-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.bng-number-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* ==========================================================================
   Quick Tags (REMOVED - kept for backwards compatibility)
   ========================================================================== */

.bng-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.bng-tag {
    padding: 8px 16px;
    background: #f0f4ff;
    color: #667eea;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bng-tag:hover {
    background: #667eea;
    color: white;
}

/* ==========================================================================
   Slider
   ========================================================================== */

.bng-slider-container {
    margin-top: 12px;
}

.bng-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.bng-slider {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.bng-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.bng-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.bng-slider-value {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

/* ==========================================================================
   Button Group
   ========================================================================== */

.bng-button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.bng-length-btn {
    padding: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bng-length-btn:hover {
    border-color: #667eea;
}

.bng-length-btn.active {
    border-color: #667eea;
    background: #f0f4ff;
    color: #667eea;
}

/* ==========================================================================
   Info Boxes
   ========================================================================== */

.bng-info-box {
    padding: 16px;
    background: #e0f2fe;
    border-left: 4px solid #0284c7;
    border-radius: 8px;
    margin-top: 16px;
}

.bng-info-box strong {
    display: block;
    margin-bottom: 4px;
    color: #0c4a6e;
}

.bng-info-box p {
    font-size: 14px;
    color: #075985;
    margin: 0;
}

.bng-info-purple {
    background: #f0f4ff;
    border-left-color: #667eea;
}

.bng-info-purple strong {
    color: #4c1d95;
}

.bng-info-purple p {
    color: #5b21b6;
}

/* ==========================================================================
   Navigation Buttons
   ========================================================================== */

.bng-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.bng-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bng-btn-primary {
    background: #667eea;
    color: white;
}

.bng-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.bng-btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.bng-btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

/* ==========================================================================
   Loading Screen
   ========================================================================== */

.bng-loading {
    text-align: center;
    padding: 60px 40px;
}

.bng-loading-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.bng-loading h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.bng-loading-messages p {
    font-size: 16px;
    color: #666;
    animation: fade 2s infinite;
}

@keyframes fade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.bng-loading-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 30px;
}

.bng-loading-progress {
    height: 100%;
    background: #667eea;
    animation: progress 3s ease-in-out;
    width: 100%;
}

@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

/* ==========================================================================
   Results Header
   ========================================================================== */

.bng-results-header {
    text-align: center;
    margin-bottom: 40px;
}

.bng-results-header h2 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.bng-results-subtitle {
    font-size: 16px;
    color: #666;
}

/* ==========================================================================
   Results Sections
   ========================================================================== */

.bng-section {
    margin-bottom: 50px;
}

.bng-section-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
}

.bng-section-perfect .bng-section-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.bng-section-nakshatra .bng-section-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.bng-section-numerology .bng-section-header {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.bng-section-general .bng-section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bng-section-header h3 {
    font-size: 28px;
    color: white;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.bng-section-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

/* Letter Groups */
.bng-letter-group {
    margin-bottom: 40px;
}

.bng-letter-header {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    text-align: center;
    margin-bottom: 20px;
    padding: 12px;
    background: #f0f4ff;
    border-radius: 8px;
}

/* No Results / Error Message */
.bng-no-results,
.bng-error-message {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bng-no-results-icon,
.bng-error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.bng-no-results h3,
.bng-error-message h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
}

.bng-no-results p,
.bng-error-message p {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
}

.bng-no-results ul {
    text-align: left;
    display: inline-block;
    margin-top: 20px;
}

.bng-no-results li {
    margin-bottom: 8px;
    color: #555;
}

.bng-btn-try-again {
    margin-top: 20px;
}

/* ==========================================================================
   Results Grid
   ========================================================================== */

.bng-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.bng-result-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
}

.bng-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

.bng-card-rank {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bng-rank-icon {
    font-size: 24px;
}

.bng-rank-number {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.bng-match-score {
    text-align: right;
}

.bng-score-number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.bng-score-label {
    display: block;
    font-size: 12px;
    color: #666;
}

.bng-card-name h3 {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.bng-card-native {
    font-size: 20px;
    color: #764ba2;
    font-weight: 500;
    margin-bottom: 4px;
}

.bng-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f4ff;
    color: #667eea;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.bng-card-details {
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.bng-detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.bng-detail-row:last-child {
    margin-bottom: 0;
}

.bng-detail-label {
    font-weight: 600;
    color: #666;
    width: 120px;
}

.bng-detail-value {
    color: #333;
}

.bng-numerology-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #764ba2;
    color: white;
    border-radius: 12px;
    font-weight: 600;
}

.bng-card-reasoning {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f0f4ff;
    border-radius: 8px;
    margin-bottom: 16px;
}

.bng-reasoning-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.bng-card-reasoning p {
    font-size: 14px;
    color: #5b21b6;
    line-height: 1.6;
    margin: 0;
}

.bng-card-actions {
    display: flex;
    gap: 12px;
}

.bng-btn-favorite,
.bng-btn-share {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
}

.bng-btn-favorite {
    background: #667eea;
    color: white;
    border: none;
}

.bng-btn-share {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.bng-external-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
}

.bng-external-link:hover {
    text-decoration: underline;
}

.bng-skip-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
}

.bng-skip-button:hover {
    color: #667eea;
}

.bng-btn-restart {
    display: block;
    margin: 30px auto 0;
    max-width: 200px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .bng-wrapper {
        padding: 15px;
    }
    
    .bng-form-container {
        padding: 24px;
    }
    
    .bng-title {
        font-size: 28px;
    }
    
    .bng-progress-label {
        font-size: 10px;
    }
    
    .bng-radio-group {
        flex-direction: column;
    }
    
    .bng-number-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .bng-button-group {
        grid-template-columns: 1fr;
    }
    
    .bng-navigation {
        flex-direction: column;
    }
    
    .bng-results-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .bng-progress::before {
        display: none;
    }
    
    .bng-progress {
        gap: 10px;
    }
    
    .bng-progress-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .bng-card-name h3 {
        font-size: 22px;
    }
}