/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fafafa;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

h1 a {
    text-decoration: none;
    color: inherit;
}

h1 a:hover,
h1 a:focus,
h1 a:active {
    text-decoration: none; /* Ensure underline is removed in all states */
    color: #555; /* Slightly darker color for the text */
}

header p {
    font-size: 1.2em;
    color: #7f8c8d;
}

/* Google Translate Section */
#translate {
    text-align: center;
    margin-bottom: 20px;
}

body > .skiptranslate {
    display: none !important;
}

#share {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* Upload Container */
.upload-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
}

.photo-tip {
    font-size: 1em;
    color: #3498db;
    margin-bottom: 15px;
}

/* Drag and Drop Area */
#dragDropArea {
    border: 2px dashed #95a5a6;
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    display: inline-block;
}

#dragDropArea:hover, #dragDropArea.dragover {
    background-color: #ecf0f1;
    border-color: #3498db;
}

#dragDropArea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
}

#imageInput {
    display: none;
}

/* Image Preview */
#imagePreview {
    max-width: 100%;
    max-height: 400px;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    border: none;
    font-size: 18px;
    text-align: center;
    text-decoration: none;
}

.btn:hover, .btn:focus {
    background-color: #c0392b;
}

.btn:active {
    transform: translateY(1px);
}

.wide-btn {
    width: calc(100% - 60px);
    max-width: 400px;
    margin: 10px auto;
}

/* Button Container */
.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.button-container .btn {
    margin: 10px 0;
}

/* Loader Styles */
#loading {
    text-align: center;
    color: #3498db;
    font-weight: bold;
    margin-top: 20px;
}

.loader {
    margin: 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#3498db 10%, transparent 10%);
    animation: rotate 1s linear infinite;
}

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

/* Result Section */
#result {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 20px;
}

#result h2, #result h3 {
    color: #2c3e50;
    margin-top: 15px;
}

#result p, #result ul {
    margin: 10px 0;
}

#result ul {
    padding-left: 20px;
    list-style-type: disc;
}

#MenuName {
    display: block;
    visibility: visible;
}

/* Privacy Notice */
.privacy-notice {
    font-size: 0.9em;
    color: #7f8c8d;
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-size: 14px;
    margin-left: 8px;
    cursor: pointer;
}

/* Analysis Tip */
.regular-analysis-tip {
    font-size: 1em;
    color: #27ae60;
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f6e9;
    border-radius: 8px;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 50px;
    color: #7f8c8d;
}

/* Footer Links */
footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover, footer a:focus {
    color: #2980b9;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    #dragDropArea {
        padding: 30px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1c1c1c;
        color: #ecf0f1;
    }

    h1, h2, h3 {
        color: #ecf0f1;
    }

    .upload-container, #result {
        background-color: #2c2c2c;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }

    #dragDropArea {
        border-color: #7f8c8d;
    }

    #dragDropArea:hover, #dragDropArea.dragover {
        background-color: #3c3c3c;
    }

    .btn {
        background-color: #e74c3c;
    }

    .btn:hover, .btn:focus {
        background-color: #c0392b;
    }

    .privacy-notice {
        background-color: #2c2c2c;
        color: #bdc3c7;
    }

    .regular-analysis-tip {
        background-color: #27ae60;
        color: #ecf0f1;
    }

    /* Loader color adjustment in dark mode */
    .loader {
        background: conic-gradient(#e74c3c 10%, transparent 10%);
    }

    footer {
        color: #bdc3c7;
    }

    footer a {
        color: #3498db;
    }

    footer a:hover, footer a:focus {
        color: #2980b9;
    }
}
