/* --- Body & Layout --- */
/* --- Body & Layout --- */
/* --- Body & Layout --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: skyblue;
    color: #333;
    line-height: 1.6;
    /* This ensures children like header/nav take full width */
    align-items: stretch; 
}

/* --- Header --- */
header {
    background: #4CAF50;
    color: #fff;
    padding: 20px 10px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 5px 0 0;
    font-size: 1.2rem;
}


nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px;
    background-color: #ffffff;
    margin: 0;
    width: 100%; /* Ensure it spans the screen */
}


nav li {
    margin: 5px 15px; /* smaller margin for mobile */
}

nav a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.2s ease;
}

nav a:hover {
    transform: scale(1.2);
}
/* --- Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    background-color: skyblue;
    color: #333;
    line-height: 1.6;
}

/* --- Header --- */
header {
    background-color: #4CAF50;
    color: #fff;
    text-align: center;
    padding: 20px 10px;
}

header h1 {
    font-size: 2.5rem;
}

header p {
    font-size: 1.2rem;
    margin-top: 5px;
}

/* --- Navigation --- */
nav {
    background-color: #fff;
}

nav ul {
    display: flex;
    flex-wrap: wrap; /* wrap on small screens */
    justify-content: center;
    list-style: none;
    padding: 10px;
}

nav li {
    margin: 5px 15px;
}

nav a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease;
}

nav a:hover {
    transform: scale(1.2);
}

/* --- Main Content --- */
main {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

section {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section h2 {
    color: #4CAF50;
    margin-bottom: 10px;
}

article h3 {
    margin-top: 15px;
    color: #333;
}

ul {
    padding-left: 20px;
}

ul li {
    margin-bottom: 10px;
}

/* --- Footer --- */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    width: 100%;
    font-size: 0.9rem;
    margin-top: auto; 
}
/* --- Responsive / Mobile --- */
@media screen and (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    header p {
        font-size: 1rem;
    }
    nav li {
        margin: 5px 10px;
    }
    main {
        padding: 15px;
    }
    section {
        padding: 15px;
    }
}

/* --- Main Content --- */
.container { 
    max-width: 500px; 
    width: 90%; 
    background: #52c230; 
    padding: 30px; 
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    
    /* This centers the box horizontally and vertically 
       within the remaining space */
    margin: auto; 
    
    /* Keep these for internal alignment */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
/* White boxes for text (matching your reference) */
.header-box, .info-box {
    background: white;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 15px;
}

h1 { 
    margin: 0; 
    color: #333; 
    font-size: 1.8rem;
}

p { 
    margin: 0; 
    color: #555; 
    font-weight: 500;
}

#preview { 
    width: 100%; 
    border-radius: 12px; 
    display: none; 
    margin-top: 15px; 
    border: 3px solid white;
}

.upload-section {
    margin: 20px 0;
}

input[type="file"] { display: none; }

/* The white 'Choose Photo' button */
.custom-file-upload {
    background: white;
    color: #333;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
    transition: 0.3s;
}

.custom-file-upload:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

/* The dark green action button */
.btn { 
    background: #28a745; 
    color: white; 
    border: 2px solid white; 
    padding: 15px 30px; 
    border-radius: 10px; 
    cursor: pointer; 
    font-size: 18px; 
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
    transition: 0.3s;
}

.btn:hover:not(:disabled) { 
    background: #218838; 
}

.btn:disabled { 
    background: #a5d6a7; 
    cursor: not-allowed; 
    border: 2px solid transparent;
}

/* Result box styling */
#result { 
    margin-top: 20px; 
    text-align: left; 
    padding: 15px; 
    background: white;
    border-radius: 12px;
    border-left: 6px solid #28a745; 
    display: none; 
}

#category {
    color: #28a745;
    font-size: 1.2rem;
    text-transform: uppercase;
}

#advice {
    color: #333;
    margin-top: 5px;
}