/* ---------------------------------------------------
   GLOBAL
--------------------------------------------------- */

* {

    box-sizing: border-box;

}


body {

    margin: 0;

    padding: 40px 20px;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f5f7fa;

    color: #202124;

}


.container {

    max-width: 900px;

    margin: auto;

}



/* ---------------------------------------------------
   HEADER
--------------------------------------------------- */

.header {

    text-align: center;

    margin-bottom: 30px;

}


.ai-badge {

    display: inline-block;

    padding: 7px 13px;

    margin-bottom: 12px;

    background: #eceff3;

    border-radius: 20px;

    font-size: 11px;

    font-weight: bold;

    letter-spacing: 1.5px;

    color: #555;

}


h1 {

    margin: 0;

    font-size: 34px;

}


.subtitle {

    margin-top: 10px;

    color: #667085;

    line-height: 1.5;

}



/* ---------------------------------------------------
   MAIN CARD
--------------------------------------------------- */

.card {

    padding: 30px;

    background: white;

    border-radius: 14px;

    box-shadow:
        0 4px 20px
        rgba(0, 0, 0, 0.08);

}


.section-label {

    display: block;

    margin-bottom: 12px;

    font-weight: bold;

}



/* ---------------------------------------------------
   UPLOAD
--------------------------------------------------- */

.upload-area {

    padding: 25px;

    text-align: center;

    border:
        2px dashed #ccd2da;

    border-radius: 10px;

    background: #fafbfc;

}


#imageInput {

    display: none;

}


.upload-button {

    display: inline-block;

    padding: 12px 24px;

    background: #202124;

    color: white;

    border-radius: 7px;

    cursor: pointer;

    font-weight: bold;

}


.upload-button:hover {

    background: #383a3d;

}


.file-name {

    margin-top: 12px;

    font-size: 13px;

    color: #667085;

}



/* ---------------------------------------------------
   IMAGE
--------------------------------------------------- */

.image-container {

    margin-top: 25px;

    text-align: center;

    overflow: auto;

}


#detectionCanvas {

    display: block;

    max-width: 100%;

    height: auto;

    margin: auto;

    border:
        1px solid #e0e3e7;

    border-radius: 10px;

}



/* ---------------------------------------------------
   DETECT BUTTON
--------------------------------------------------- */

#detectButton {

    width: 100%;

    margin-top: 22px;

    padding: 15px;

    border: none;

    border-radius: 8px;

    background: #202124;

    color: white;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

}


#detectButton:hover {

    background: #383a3d;

}


#detectButton:disabled {

    opacity: 0.5;

    cursor: not-allowed;

}



/* ---------------------------------------------------
   STATUS
--------------------------------------------------- */

#status {

    margin-top: 18px;

    text-align: center;

    color: #667085;

    font-size: 14px;

}



/* ---------------------------------------------------
   RESULTS
--------------------------------------------------- */

.results {

    margin-top: 30px;

    padding-top: 25px;

    border-top:
        1px solid #eceff3;

}


.result-title {

    margin-bottom: 20px;

    text-align: center;

    font-size: 21px;

    font-weight: bold;

}



/* ---------------------------------------------------
   SUMMARY
--------------------------------------------------- */

.summary-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;

    margin-bottom: 30px;

}


.summary-card {

    padding: 20px;

    text-align: center;

    background: #f6f7f9;

    border-radius: 10px;

}


.summary-card strong {

    display: block;

    margin-top: 7px;

    font-size: 24px;

}


.summary-label {

    font-size: 11px;

    letter-spacing: 1px;

    color: #667085;

}



/* ---------------------------------------------------
   DETECTION LIST
--------------------------------------------------- */

.all-results-title {

    margin-bottom: 20px;

    font-weight: bold;

}


.detection-row {

    margin-bottom: 20px;

    padding-bottom: 15px;

    border-bottom:
        1px solid #eceff3;

}


.detection-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 8px;

}


.detection-name {

    font-weight: bold;

}


.rank {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 25px;

    height: 25px;

    margin-right: 8px;

    background: #eceff3;

    border-radius: 50%;

    font-size: 12px;

}


.percentage {

    font-weight: bold;

}


.box-info {

    margin-top: 7px;

    font-size: 12px;

    color: #777;

}



/* ---------------------------------------------------
   SCORE BAR
--------------------------------------------------- */

.bar-background {

    height: 10px;

    background: #e8eaed;

    border-radius: 10px;

    overflow: hidden;

}


.bar {

    height: 100%;

    background: #333;

    border-radius: 10px;

}



/* ---------------------------------------------------
   WARNING
--------------------------------------------------- */

.score-warning {

    margin-top: 25px;

    padding: 15px;

    background: #f7f7f7;

    border-left:
        4px solid #777;

    border-radius: 5px;

    font-size: 13px;

    line-height: 1.6;

    color: #555;

}



/* ---------------------------------------------------
   INFO
--------------------------------------------------- */

.info {

    margin-top: 25px;

    padding: 25px;

    background: white;

    border-radius: 12px;

    box-shadow:
        0 2px 10px
        rgba(0, 0, 0, 0.04);

    line-height: 1.65;

    color: #555;

}


.info-title {

    margin-bottom: 12px;

    font-size: 19px;

    font-weight: bold;

    color: #202124;

}



/* ---------------------------------------------------
   FLOW
--------------------------------------------------- */

.flow {

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;

    margin: 25px 0;

}


.flow-box {

    padding: 11px 15px;

    background: #f3f4f6;

    border:
        1px solid #e1e4e8;

    border-radius: 7px;

    font-size: 13px;

    font-weight: bold;

    color: #333;

}


.final-box {

    background: #202124;

    color: white;

    border-color: #202124;

}


.arrow {

    font-weight: bold;

    color: #777;

}



/* ---------------------------------------------------
   COMPARISON
--------------------------------------------------- */

.comparison {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;

    margin-top: 20px;

}


.comparison-card {

    padding: 20px;

    text-align: center;

    background: #f7f8fa;

    border-radius: 9px;

}



/* ---------------------------------------------------
   MODEL INFO
--------------------------------------------------- */

.model-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;

    margin-top: 18px;

}


.model-grid > div {

    padding: 15px;

    background: #f7f8fa;

    border-radius: 8px;

}


.model-label {

    display: block;

    margin-bottom: 5px;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1px;

    color: #777;

}



/* ---------------------------------------------------
   NO DETECTION
--------------------------------------------------- */

.no-detection {

    padding: 20px;

    text-align: center;

    background: #f7f8fa;

    border-radius: 8px;

    color: #667085;

}



/* ---------------------------------------------------
   IMPORTANT
--------------------------------------------------- */

.warning {

    border-left:
        4px solid #777;

}



/* ---------------------------------------------------
   FOOTER
--------------------------------------------------- */

.footer {

    padding: 30px 10px;

    text-align: center;

    color: #999;

    font-size: 12px;

}



/* ---------------------------------------------------
   UTILITY
--------------------------------------------------- */

.hidden {

    display: none;

}



/* ---------------------------------------------------
   MOBILE
--------------------------------------------------- */

@media (max-width: 700px) {


    body {

        padding: 20px 12px;

    }


    .card {

        padding: 20px;

    }


    h1 {

        font-size: 27px;

    }


    .model-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .comparison {

        grid-template-columns: 1fr;

    }


    .flow {

        flex-direction: column;

    }

}