/* =========================
   RESET
========================= */

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

body{
    background:#eef3f9;
    font-family:'Segoe UI',sans-serif;
    color:#333;
}

/* =========================
   NAVBAR
========================= */

nav{
    background:#1e3a5f;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:15px 50px;

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

/* LOGO */

.logo{
    display:flex;
    align-items:center;
    gap:12px;

    color:white;
    font-size:24px;
    font-weight:bold;
}

.logo img{
    width:65px;
    height:65px;

    object-fit:cover;

    border-radius:50%;
}

/* MENU */

nav ul{
    display:flex;
    list-style:none;
    gap:20px;
}

nav ul li a{
    color:white;
    text-decoration:none;

    font-size:17px;

    transition:0.3s;
}

nav ul li a:hover{
    color:#dbe9ff;
}

/* =========================
   CONTAINER
========================= */

.container{
    width:90%;
    max-width:1200px;

    margin:40px auto;
}

/* =========================
   CARD
========================= */

.card{
    background:#ffffff;

    transition:.3s;

    padding:40px;

    border-radius:20px;

    box-shadow:0 5px 15px rgba(0,0,0,0.08);

    text-align:center;
}

.card:hover{

    transform:translateY(-3px);

    box-shadow:0 10px 25px rgba(0,0,0,.12);

}

/* =========================
   TEXT
========================= */

h1{
    color:#1e3a5f;
    margin-bottom:20px;
}

h2{
    margin-bottom:15px;
}

p{
    line-height:1.8;
    margin-bottom:15px;
}

/* =========================
   BUTTON
========================= */

button{
    background:#1e3a5f;
    color:white;

    border:none;

    padding:12px 25px;

    border-radius:10px;

    cursor:pointer;

    font-size:16px;

    transition:0.3s;
}

button:hover{
    background:#274d7e;
    
}

button:hover,
.upload-btn:hover,
.upload-again-btn:hover{

    transform:translateY(-2px);

}

/* =========================
   INPUT
========================= */

input[type="file"]{
    margin:20px 0;
}

.login-card input{
    width:100%;

    padding:12px;

    margin-bottom:15px;

    border:1px solid #ccc;

    border-radius:8px;
}

/* =========================
   IMAGE
========================= */

.preview-image{
    width:300px;

    border-radius:15px;

    margin-top:20px;
}

/* =========================
   LOGIN
========================= */

.login-card{
    max-width:400px;
    margin:auto;
}

.error{
    color:red;
    margin-bottom:15px;
}

/* =========================
   DASHBOARD
========================= */

.dashboard-header{
    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:30px;
}

.dashboard-title{
    margin-bottom:0;
}

.dashboard-card{
    background:#ffffff;

    padding:30px;

    border-radius:20px;

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

    margin-bottom:30px;

    text-align:center;
}

.history-section{
    background:#ffffff;

    padding:30px;

    border-radius:20px;

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

.history-image{
    width:110px;
    height:110px;
    object-fit:cover;
    border-radius:8px;
}

/* =========================
   LOGOUT BUTTON
========================= */

.logout-btn{
    background:#dc3545;
}

.logout-btn:hover{
    background:#bb2d3b;
}

/* =========================
   TABLE
========================= */

table{
    width:100%;

    border-collapse:collapse;

    margin-top:20px;
}

table th,
table td{
    border:1px solid #ddd;

    padding:12px;

    text-align:center;
}

table th{
    background:#1e3a5f;
    color:white;
}

.table-image{
    width:100px;

    border-radius:10px;
}

/* =========================
   RESULT LANDSCAPE
========================= */

.result-wrapper{
    width:100%;

    min-height:85vh;

    display:flex;

    justify-content:center;

    align-items:center;

    padding:40px;
}

.result-landscape{
    width:98%;
    max-width:1600px;

    background:#ffffff;

    border-radius:25px;

    display:flex;

    justify-content:space-between;

    align-items:stretch;

    gap:50px;

    padding:50px;

    box-shadow:0 5px 20px rgba(0,0,0,0.1);
}

/* RESULT COLUMN */

.result-left,
.result-center,
.result-right{
    flex:1;

    text-align:center;
}

/* RESULT IMAGE */

.uploaded-image,
.motif-image{
    width:100%;

    max-width:380px;

    height:450px;

    object-fit:cover;

    border-radius:20px;

    margin-top:20px;

    box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

/* RESULT TITLE */

.result-title{
    font-size:55px;

    color:#1f4373;

    margin-bottom:20px;
}

/* RESULT CONFIDENCE */

.confidence-text{
    font-size:24px;

    margin-top:15px;
}

.confidence-value{
    color:#198754;

    font-size:50px;

    margin-bottom:30px;
}

/* RESULT DESCRIPTION */

.description-box{
    background:#f5f5f5;

    padding:30px;

    border-radius:18px;

    text-align:justify;

    line-height:1.9;

    font-size:17px;

    margin-top:20px;
}

.description-box h3{
    color:#1f4373;

    margin-bottom:15px;
}

/* RESULT BUTTON */

.upload-again-btn{
    margin-top:35px;

    background:#1f4373;

    color:white;

    border:none;

    padding:16px 35px;

    border-radius:12px;

    font-size:18px;

    cursor:pointer;

    transition:0.3s;
}

.upload-again-btn:hover{
    background:#16345a;

    transform:scale(1.05);
}

.action-buttons a{
    text-decoration:none;
}

.upload-btn{
    display:inline-block;
    padding:12px 20px;
    background:#2E8B57;
    color:white;
    border-radius:8px;
    cursor:pointer;
    margin-bottom:15px;
    font-weight:bold;
}

.upload-btn:hover{
    background:#256d46;
}

/* ==========================================
   RESPONSIVE MOBILE
========================================== */

@media (max-width:768px){

    /* NAVBAR */

    nav{
        flex-direction:column;
        padding:15px;
        gap:15px;
        text-align:center;
    }

    .logo{
        font-size:20px;
    }

    .logo img{
        width:50px;
        height:50px;
    }

    nav ul{
        flex-wrap:wrap;
        justify-content:center;
        gap:10px;
    }

    nav ul li a{
        font-size:15px;
    }

    /* CONTAINER */

    .container{
        width:95%;
        margin:20px auto;
    }

    /* CARD */

    .card{
        padding:20px;
        border-radius:15px;
    }

    /* TEXT */

    h1{
        font-size:28px;
    }

    h2{
        font-size:22px;
    }

    p{
        font-size:15px;
        line-height:1.7;
    }

    /* PREVIEW */

    .preview-image{
        width:100%;
        max-width:280px;
        height:auto;
    }

    /* BUTTON */

    button,
    .upload-btn,
    .upload-again-btn{

        width:100%;

        margin-top:10px;

        font-size:16px;
    }

    input[type=file]{
        width:100%;
    }

    /* LOGIN */

    .login-card{
        width:100%;
    }

    /* RESULT */

    .result-wrapper{
        padding:15px;
    }

    .result-landscape{

        flex-direction:column;

        padding:20px;

        gap:25px;
    }

    .uploaded-image,
    .motif-image{

        width:100%;

        max-width:280px;

        height:auto;
    }

    .result-title{
        font-size:28px;
    }

    .confidence-value{
        font-size:32px;
    }

    .confidence-text{
        font-size:18px;
    }

    .description-box{
        padding:20px;
        font-size:15px;
    }

    /* TABLE */

    .history-section{

        overflow-x:auto;
    }

    table{

        min-width:900px;
    }

    .table-image{
        width:70px;
    }

}