/* Base styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: #f0f4f8;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
    margin-bottom: 0.5rem;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-yes {
    background-color: #4CAF50;
    color: white;
}

.btn-no {
    background-color: #F44336;
    color: white;
}

.btn-yes:hover, .btn-no:hover {
    filter: brightness(90%);
}

.flex-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

/* Forms */
select, input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 1rem;
}

/* Results */
#results {
    background-color: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Utility classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Tailwind-like utility classes */
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.max-w-xs { max-width: 20rem; }
.block { display: block; }

/* Full-screen layout */
#test-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

#item-container {
    text-align: center;
}

#home-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

/* Make images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Make the results table responsive */
table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
    table-layout: fixed;
}

th, td {
    padding: 0.75rem;
    text-align: center;
}

/* Responsive styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .btn {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.25rem;
    }
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-height: 44px;
        min-width: 44px;
    }
}

/* New color classes for interpretation */
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }
.text-orange-600 { color: #ea580c; }
.text-red-600 { color: #dc2626; }

/* Ensure table borders are visible */
table, th, td {
    border: 1px solid #e5e7eb;
    border-collapse: collapse;
}

/* New class for final results container */
.final-results-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
}

.overlay-content {
    background-color: rgba(0, 0, 0, 0.5);  /* Reduced opacity for better visibility */
    padding: 1rem;
    width: 100%;
    max-width: 600px;  /* Limit the maximum width */
    margin: 0 auto;  /* Center the content */
    border-radius: 10px;  /* Add rounded corners */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);  /* Add a subtle shadow */
}

.overlay-content h2 {
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);  /* Add text shadow for better readability */
    margin-bottom: 0.5rem;
}

.overlay-content p {
    font-size: 1rem;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);  /* Add text shadow for better readability */
    margin-bottom: 1rem;
}

.button-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

@media (orientation: landscape) {
    .fullscreen-container {
        background-size: contain;
    }
}

@media (orientation: portrait) {
    .fullscreen-container {
        background-size: contain;
    }
}

@media (max-width: 768px) {
    .overlay-content {
        padding: 0.5rem;
    }
    
    .overlay-content h2 {
        font-size: 1.2rem;
    }
    
    .overlay-content p {
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}
