body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eef2f6; /* Light gray-blue */
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #4a69bd; /* Blue */
    color: #fff;
    padding: 2em 1em;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0 0 0.5em 0;
    font-size: 2.5em;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lang-button {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 8px 12px;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

.lang-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.lang-button.active {
    background-color: #fff;
    color: #4a69bd;
    font-weight: bold;
}

/* Drag and Drop Zone Styles */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    color: #777;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.drop-zone.highlight {
    background-color: #e0f2f7; /* Light blue highlight */
    border-color: #4a69bd;
}

.drop-zone img {
    max-width: 100%;
    max-height: 150px; /* Limit height of displayed image within drop zone */
    object-fit: contain;
    margin-top: 10px;
    /* display: none; Removed to prevent conflict with JS */
}


main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 15px;
}

.input-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width */
}

button#get-recommendations {
    background-color: #2ecc71; /* Green */
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button#get-recommendations:hover {
    background-color: #27ae60; /* Darker green */
}

.recommendations-section {
    margin-top: 40px;
}

.recommendations-section h2 {
    text-align: center;
    color: #4a69bd; /* Blue */
    margin-bottom: 30px;
    font-size: 2em;
}

#user-photo-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

#user-photo-display h3 {
    color: #34495e;
    margin-bottom: 15px;
}

#comparison-image {
    max-width: 300px; /* Max width for the comparison image */
    height: auto;
    border: 3px solid #4a69bd; /* Highlight with blue border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

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

.hairstyle-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    text-align: center;
}

.hairstyle-card:hover {
    transform: translateY(-8px);
}

.hairstyle-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.hairstyle-card-content {
    padding: 15px;
}

.hairstyle-card h3 {
    margin-top: 0;
    color: #34495e; /* Darker blue-gray */
    font-size: 1.4em;
    margin-bottom: 10px;
}

.hairstyle-card p {
    font-size: 0.95em;
    color: #777;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1.5em 1em;
    margin-top: 50px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
}


.input-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9em;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

.input-group img#uploaded-image {
    display: block;
    margin-top: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .input-section {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group {
        min-width: unset;
    }

    button#get-recommendations {
        width: 100%;
    }

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