/* BestPick Optimized CSS - Railway Ready */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: floatAnimation 20s ease-in-out infinite;
}

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: containerFadeIn 1s ease-out;
}

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

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header h1 img {
    height: 80px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

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

.header p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

.content {
    padding: 50px 40px;
}

.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    text-align: center;
    border-radius: 25px;
    margin: 0 0 50px 0;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.cta-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 20px;
}

.cta-section p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.goal-selection-section {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.goal-selection-section h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 600;
}

.goal-selection-section p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.goal-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.goal-option {
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.goal-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.goal-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.goal-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.goal-option-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.goal-option h4 {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 600;
}

.goal-option p {
    font-size: 0.95em;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0;
}

.goal-option.selected h4,
.goal-option.selected p {
    color: white;
}

.upload-section {
    text-align: center;
    margin-bottom: 60px;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.file-input-wrapper:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 100px;
    opacity: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
}

.preview-section {
    margin-bottom: 40px;
}

.preview-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.6em;
    font-weight: 600;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.image-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.image-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.image-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-card .card-body {
    padding: 20px;
    background: linear-gradient(to bottom, white, #fafafa);
}

.image-card .filename {
    font-size: 0.95em;
    color: #555;
    text-align: center;
    word-break: break-all;
    font-weight: 500;
}

.action-buttons {
    text-align: center;
    margin-bottom: 40px;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    margin: 0 15px 10px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

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

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.cta-btn {
    background: white;
    color: #667eea;
    font-weight: bold;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.result-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    animation: resultAppear 0.8s ease-out;
}

@keyframes resultAppear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.result-section h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 700;
}

.selected-image {
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.selected-image:hover {
    transform: scale(1.02);
}

.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

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

.hidden {
    display: none;
}

.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #c62828;
    animation: messageSlide 0.5s ease-out;
}

.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #2e7d32;
    animation: messageSlide 0.5s ease-out;
}

.info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #1565c0;
    animation: messageSlide 0.5s ease-out;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.steps-section {
    padding: 60px 0;
}

.steps-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 50px;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.step {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.step h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.step p {
    color: #666;
    line-height: 1.7;
}

.seo-content {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px;
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.seo-content h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.seo-content h3 {
    color: #444;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
}

.seo-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.05em;
}

.seo-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.seo-content li {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.feature-card {
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.feature-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

/* Result styling */
.result-image-container {
    margin-bottom: 30px;
}

.result-details {
    margin-top: 30px;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.result-header {
    margin-bottom: 20px;
}

.result-header h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.result-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.score-badge, .confidence-badge, .cache-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}


.score-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.confidence-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.cache-badge {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

.analysis-details {
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.analysis-details h5 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.reasoning-section {
    margin-bottom: 20px;
}

.reasoning-section p {
    color: #555;
    line-height: 1.7;
    margin: 0;
    font-size: 1.05em;
}

.criteria-scores {
    margin-bottom: 20px;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.criteria-name {
    font-weight: 500;
    color: #333;
}

.criteria-score {
    font-weight: 600;
    color: #667eea;
}

.performance-info {
    text-align: center;
    margin-top: 15px;
}

.performance-info small {
    color: #999;
    font-size: 0.9em;
}

.share-section {
    margin-top: 30px;
    text-align: center;
}

.share-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    color: white;
}

.share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
}

.share-linkedin {
    background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
    color: white;
}

.share-download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        flex-direction: column;
        gap: 10px;
    }

    .content {
        padding: 30px 20px;
    }

    .cta-section {
        padding: 40px 20px;
    }

    .goal-options {
        grid-template-columns: 1fr;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        margin: 5px;
        padding: 15px 25px;
    }

    .share-btn {
        font-size: 0.8em;
        padding: 10px 15px;
        margin: 5px;
    }

    .result-meta {
        flex-direction: column;
        gap: 10px;
    }

    .scores-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Touch-friendly interactions for mobile */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}
/* Footer Styles - Add this at the end of main.css */

.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 60px 20px 30px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: #3498db;
    font-size: 1.3em;
    font-weight: 600;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 2px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
    width: 100px;
    margin-right: 15px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.footer-logo h4 {
    margin: 0;
    color: #3498db;
    font-size: 1.5em;
    font-weight: 700;
}

.footer-section p {
    line-height: 1.7;
    color: #bdc3c7;
    margin-bottom: 20px;
    font-size: 1.05em;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 1.05em;
}

.footer-section a:hover {
    color: #3498db;
    padding-left: 10px;
}

.photo-types, .trust-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photo-type, .trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: transform 0.3s ease;
}

.photo-type:hover, .trust-badge:hover {
    transform: translateX(5px);
    border-color: rgba(52, 152, 219, 0.3);
}

.verification-section {
    text-align: center;
    margin: 40px 0 30px;
}

.verification-section a {
    display: inline-block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.verification-section a:hover {
    transform: scale(1.05);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(52, 152, 219, 0.2);
}

.feature-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    color: #ecf0f1;
    font-size: 0.9em;
}

.copyright {
    color: #bdc3c7;
    margin: 0;
    font-size: 0.95em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Footer responsive design */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-tags {
        flex-direction: column;
        gap: 10px;
    }
    
    .copyright {
        flex-direction: column;
        gap: 5px;
    }
}
/* Add these styles to your main.css or create a new CSS file */

/* Result Section Improvements */
.result-section {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    margin: 0;
}

/* Selected Image Container */
.result-image-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Center and size the selected image */
.selected-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto;
    object-fit: cover;
}

/* Selected filename styling */
.selected-filename {
    text-align: center;
    font-weight: 600;
    color: #333;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Score and Confidence Badges - Full Width */
.score-confidence-container {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem auto;
}

.score-badge, .confidence-badge {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    margin: 0;
}

.score-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.confidence-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Analysis Result Container - Full Width */
.ai-analysis {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid #667eea;
}

.ai-analysis h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reasoning {
    line-height: 1.6;
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Analysis Metadata */
.analysis-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.analysis-metadata span {
    font-size: 0.85rem;
    color: #666;
    padding: 0.25rem 0;
}

/* Action Buttons - Full Width */
.action-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.action-buttons .btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* No Suitable Image Result Styling */
.no-suitable-result {
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #ffebee 0%, #fff3e0 100%);
    border-radius: 15px;
    border: 2px solid #ff9800;
    margin: 1rem 0;
}

.no-suitable-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-suitable-result h3 {
    color: #ff5722;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.feedback-section {
    margin: 1.5rem 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
}

.feedback-section h4 {
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.improvement-tips {
    margin: 1rem 0;
    padding-left: 1.5rem;
    text-align: left;
}

.improvement-tips li {
    margin: 0.75rem 0;
    color: #555;
    line-height: 1.5;
}

/* Individual Analysis Styles */
.individual-analysis-title {
    text-align: center;
    color: #333;
    margin-top: 50px;
    margin-bottom: 25px;
    font-size: 1.6em;
    font-weight: 600;
}

.individual-analysis-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.individual-analysis-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.analysis-card-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.analysis-card-content {
    text-align: left;
}

.analysis-card-filename {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95em;
    word-break: break-all;
}

.analysis-card-text {
    font-size: 1em;
    color: #555;
    line-height: 1.6;
}


/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .result-section {
        padding: 0.75rem;
    }
    
    .selected-image {
        max-width: 100%;
        border-radius: 8px;
    }
    
    .ai-analysis {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .score-confidence-container {
        max-width: 100%;
    }
    
    .analysis-metadata {
        padding: 0.75rem;
    }
    
    .action-buttons .btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .feedback-section {
        padding: 1rem;
    }
    
    .no-suitable-result {
        padding: 1.5rem 1rem;
    }

    .individual-analysis-card {
        flex-direction: column;
        text-align: center;
    }

    .analysis-card-content {
        text-align: center;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .result-section {
        padding: 0.5rem;
    }
    
    .selected-image {
        border-radius: 6px;
    }
    
    .ai-analysis {
        padding: 0.875rem;
        border-radius: 10px;
    }
    
    .score-badge, .confidence-badge {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .action-buttons .btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}
/* Add this to your main.css to hide the separate individual analysis section */

/* Hide the separate individual analysis section when results are shown */
#resultSection:not(.hidden) .individual-analysis-title,
#resultSection:not(.hidden) #individualAnalysisContainer {
    display: none !important;
}

/* Ensure inline individual analysis displays correctly */
.individual-analysis-inline {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.individual-analysis-inline h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
}

/* Individual analysis cards within the AI analysis section */
.ai-analysis .individual-analysis-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #667eea;
    margin-bottom: 15px;
}

.ai-analysis .analysis-card-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ai-analysis .analysis-card-content {
    text-align: left;
    flex: 1;
}

.ai-analysis .analysis-card-filename {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9em;
    word-break: break-all;
}

.ai-analysis .analysis-card-text {
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .ai-analysis .individual-analysis-card {
        flex-direction: column;
        text-align: center;
    }
    
    .ai-analysis .analysis-card-content {
        text-align: center;
    }
    
    .ai-analysis .analysis-card-image {
        width: 100px;
        height: 100px;
    }
}