/* Analyze Number Page Styles */

/* Hero Section for Analyze Page */
.analyze-hero {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 50%, #6366F1 100%);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.analyze-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="60" height="60" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Analysis Form Card */
.analysis-form-card {
    background: white;
    border-radius: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
}

.analysis-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899, #F59E0B);
    border-radius: 2rem 2rem 0 0;
}

.analyze-input {
    border: 3px solid #E5E7EB;
    border-radius: 1.5rem;
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    background: #F9FAFB;
}

.analyze-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 0.5rem rgba(99, 102, 241, 0.15);
    background: white;
    transform: translateY(-2px);
}

.btn-analyze {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    border: none;
    border-radius: 1.5rem;
    padding: 1.25rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-analyze:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-analyze:active {
    transform: translateY(-1px);
}

/* Result Card Premium */
.result-card-premium {
    background: white;
    border-radius: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid #e5e7eb;
}

.result-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
}

.result-header-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="60" height="60" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.result-number-display {
    font-size: 6rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    margin: 1.5rem 0;
    position: relative;
    z-index: 1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-align: center;
    display: block;
    /* สีทองเรียบง่าย ไม่มีเอฟเฟคซับซ้อน */
}

.lucky-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.lucky-stars .fa-star {
    font-size: 1.5rem;
    color: #FCD34D;
    text-shadow: 0 2px 10px rgba(252, 211, 77, 0.5);
    transition: all 0.3s ease;
}

.lucky-stars .fa-star.empty {
    color: rgba(255, 255, 255, 0.3);
}



/* Meaning Cards */
.meaning-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.meaning-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.good-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #22c55e;
}

.good-card:hover {
    border-color: #16a34a;
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.15);
}

.warning-card {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-color: #eab308;
}

.warning-card:hover {
    border-color: #ca8a04;
    box-shadow: 0 12px 30px rgba(234, 179, 8, 0.15);
}

/* Number Meaning Grid */
.number-meaning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.single-number-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid #E5E7EB;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.single-number-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6);
}

.single-number-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
    border-color: #6366F1;
}

.single-number-card:hover .number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.single-number-card .number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.single-number-card .meaning-title {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.single-number-card .meaning-desc {
    font-size: 0.875rem;
    color: #6B7280;
    line-height: 1.5;
}

/* Enhanced Number Cards for Suggestions - ตามรูปแบบเดิม */
.analyze-number-card-enhanced {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #E5E7EB;
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 200px;
}

.analyze-number-card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #6366F1;
}

.analyze-number-card-enhanced.sold {
    opacity: 0.6;
    filter: grayscale(50%);
}

.analyze-number-card-enhanced.sold::after {
    content: 'ขายแล้ว';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: #EF4444;
    color: white;
    padding: 0.5rem 2rem;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 0.5rem;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* VIP Badge */
.analyze-number-card-enhanced .position-absolute {
    top: 0.75rem;
    left: 0.75rem;
    z-index: 5;
}

.analyze-number-card-enhanced .position-absolute .badge {
    background: linear-gradient(135deg, #F59E0B, #FCD34D) !important;
    color: #92400E !important;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Operator Badge */
.operator-badge-enhanced {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
}

.operator-badge-enhanced .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.operator-ais {
    background: #00A651 !important;
    color: white !important;
}

.operator-dtac {
    background: #1E3A8A !important;
    color: white !important;
}

.operator-true {
    background: #DC2626 !important;
    color: white !important;
}

/* Card Body */
.card-body-enhanced {
    padding: 3rem 1.5rem 1.5rem;
    text-align: center;
    height: auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

/* Phone Number Display */
.analyze-number-display-new {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1F2937;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-family: 'Courier New', monospace;
    line-height: 1.2;
}

/* Price Display */
.analyze-price-display-new {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

/* Badge Container */
.analyze-badge-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.analyze-badge-container .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
}

.analyze-badge-container .badge.bg-light {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid #D1D5DB;
}

.analyze-badge-container .badge.bg-info {
    background: #3B82F6 !important;
    color: white !important;
}

/* Card Buttons */
.analyze-card-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: auto;
}

.analyze-card-buttons .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.analyze-card-buttons .btn-outline-primary {
    background: transparent;
    border: 2px solid #3B82F6 !important;
    color: #3B82F6;
}

.analyze-card-buttons .btn-outline-primary:hover {
    background: #3B82F6;
    color: white;
    transform: translateY(-2px);
}

.analyze-card-buttons .btn-primary {
    background: #10B981;
    color: white;
}

.analyze-card-buttons .btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
}

.analyze-card-buttons .btn-secondary {
    background: #6B7280;
    color: white;
}

/* VIP Badge Styling */
.analyze-number-card-enhanced .position-absolute .badge {
    background: linear-gradient(135deg, #F59E0B, #FCD34D) !important;
    color: #92400E !important;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Suggestion Cards Grid Layout */
.suggestion-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Ensure equal height cards */
.suggestion-cards-grid .analyze-number-card-enhanced {
    min-height: 200px;
}

/* Better spacing for suggestion section */
.suggestions-section {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 2rem;
    padding: 3rem 2rem;
    margin-top: 3rem;
    border: 1px solid #E5E7EB;
}

.suggestions-section h3 {
    color: #1F2937;
    margin-bottom: 2rem;
    font-weight: 800;
}

.btn-magnetic {
    transition: all 0.3s ease;
}

.btn-magnetic:hover {
    transform: translateY(-2px);
}

/* Popular Sum Cards */
.popular-sum-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    border: 2px solid #E5E7EB;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.popular-sum-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F59E0B, #FCD34D);
}

.popular-sum-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.2);
    border-color: #F59E0B;
}

.popular-sum-card:hover .sum-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popular-sum-card .sum-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #F59E0B 0%, #FCD34D 50%, #FBBF24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.popular-sum-card .lucky-stars {
    justify-content: center;
    margin-bottom: 1rem;
}

.popular-sum-card .lucky-stars .fa-star.small {
    font-size: 1rem;
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Container Positioning */
.analyze-form-container {
    margin-top: -3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .analyze-hero {
        padding: 4rem 0 2rem;
    }
    
    /* Fix form position on mobile - move down to avoid header overlap */
    .analyze-form-container {
        margin-top: 1rem !important;
    }

    .result-number-display {
        font-size: 4.5rem;
        letter-spacing: 0.06em;
    }

    .analyze-input {
        font-size: 1.125rem;
        padding: 1.25rem 1.5rem;
    }

    .btn-analyze {
        font-size: 1.125rem;
        padding: 1rem 1.5rem;
    }

    .number-meaning-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .analyze-card-buttons {
        flex-direction: column;
    }

    .analyze-card-buttons .btn {
        flex: none;
    }

    .single-number-card .number {
        font-size: 2rem;
    }

    .analyze-number-display-new {
        font-size: 1.5rem;
    }

    .analyze-price-display-new {
        font-size: 1.25rem;
    }

    /* Mobile adjustments for suggestion cards */
    .analyze-number-card-enhanced {
        margin-bottom: 1rem;
        min-height: 180px;
    }

    .card-body-enhanced {
        padding: 2.5rem 1rem 1rem;
    }

    .analyze-number-display-new {
        font-size: 1.25rem;
    }

    .analyze-price-display-new {
        font-size: 1.5rem;
    }

    .analyze-card-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .analyze-card-buttons .btn {
        flex: none;
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }

    .analyze-badge-container .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .analysis-form-card .card-body {
        padding: 2rem !important;
    }

    .result-header-gradient {
        padding: 2rem 1rem;
    }

    .result-number-display {
        font-size: 3.5rem;
        letter-spacing: 0.05em;
        margin: 1rem 0;
    }

    .meaning-card {
        padding: 1.5rem;
    }

    .single-number-card {
        padding: 1rem;
    }

    .popular-sum-card {
        padding: 1.5rem;
    }

    .popular-sum-card .sum-number {
        font-size: 2rem;
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Focus Ring for Accessibility */
.focus-ring:focus {
    outline: 2px solid #6366F1;
    outline-offset: 2px;
}

/* Loading State */
.btn-analyze.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-analyze.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Simple gentle pulse animation - ไม่ใช้กับตัวเลขผลคำทำนาย */
@keyframes gentlePulse {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

/* ตัวเลขผลคำทำนายสีทองเรียบง่าย */

/* 
Additional improvements for suggestion cards */
.analyze-number-card-enhanced {
    min-height: 200px;
    max-width: 100%;
    height: auto;
    flex: 1;
}

/* Better phone number display */
.analyze-number-display-new {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Improved badge styling */
.analyze-badge-container .badge.bg-light {
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB) !important;
    color: #374151 !important;
    border: 1px solid #D1D5DB;
}

.analyze-badge-container .badge.bg-info {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8) !important;
    color: white !important;
}

/* Enhanced hover effects */
.analyze-number-card-enhanced:hover .analyze-number-display-new {
    /* เอา background ออกเพื่อไม่ให้บังเบอร์ */
}

.analyze-number-card-enhanced:hover .analyze-price-display-new {
    transform: scale(1.05);
}

/* Better sold state */
.analyze-number-card-enhanced.sold .analyze-number-display-new,
.analyze-number-card-enhanced.sold .analyze-price-display-new {
    opacity: 0.5;
}

/* Responsive grid improvements */
@media (max-width: 1200px) {
    .suggestion-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .analyze-number-card-enhanced {
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .suggestions-section {
        padding: 2rem 1rem;
        border-radius: 1rem;
    }

    .suggestion-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .analyze-number-card-enhanced {
        min-height: 200px;
    }
}

/* Loading state for suggestion cards */
.suggestion-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #6B7280;
}

.suggestion-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

/* Empty state */
.suggestion-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #6B7280;
}

.suggestion-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}/* F
ORCE 2 COLUMNS LAYOUT - HIGHEST PRIORITY */
.suggestion-cards-container .row .col-md-6.mb-4 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    display: block !important;
}

/* Force 2 columns on all screen sizes except very small mobile */
@media (min-width: 577px) {
    .suggestion-cards-container .row .col-md-6.mb-4 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

/* Only 1 column on very small screens */
@media (max-width: 576px) {
    .suggestion-cards-container .row .col-md-6.mb-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Override any Bootstrap or other CSS */
.mt-5.suggestion-cards-container .row.g-4.justify-content-center .col-md-6.mb-4 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
}

@media (max-width: 576px) {
    .mt-5.suggestion-cards-container .row.g-4.justify-content-center .col-md-6.mb-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}/* F
orce 2 columns with custom flex layout */
.suggestion-cards-container > div[style*="display: flex"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    margin: 0 !important;
}

.suggestion-cards-container > div[style*="display: flex"] > div {
    width: calc(50% - 0.5rem) !important;
    flex: 0 0 calc(50% - 0.5rem) !important;
    max-width: calc(50% - 0.5rem) !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box !important;
}

/* Mobile: 1 column */
@media (max-width: 576px) {
    .suggestion-cards-container > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .suggestion-cards-container > div[style*="display: flex"] > div {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Extra Mobile Responsive - Small screens */
@media (max-width: 480px) {
    .analyze-hero {
        padding: 3rem 0 1.5rem;
    }
    
    /* Move form container further down on small screens */
    .analyze-form-container {
        margin-top: 1.5rem !important;
    }
    
    .analyze-hero h1 {
        font-size: 1.75rem !important;
    }
    
    .analyze-hero .lead {
        font-size: 0.95rem !important;
    }
    
    .analysis-form-card .card-body {
        padding: 2rem 1.5rem !important;
    }
    
    .analyze-input {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }
    
    .btn-analyze {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

/* Very Small Mobile - Extra spacing */
@media (max-width: 360px) {
    .analyze-form-container {
        margin-top: 2rem !important;
    }
    
    .analyze-hero {
        padding: 2.5rem 0 1rem;
    }
    
    .analysis-form-card .card-body {
        padding: 1.5rem 1rem !important;
    }
}