:root {
    --bg-color: #F6F6F6;
    --text-color: #333333;
    --primary-color: #FF8888;
    --secondary-color: #9786FF;
    --error-color: #FF5C5C;
    --bg-gradient-1: linear-gradient(185deg, rgba(246, 246, 246, 0) 0%, #FFF3F3 100%);
    --bg-gradient-2: linear-gradient(175deg, rgba(236, 158, 255, 0) 0%, rgba(140, 200, 255, 0.20) 100%);
}
html, body {
    height: 100%;
}
table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
}
nav {
    background-color: #9786FF; /* Pink background */
}

.menu {
    list-style-type: none;
    display: flex;
    justify-content: center;
    padding: 10px;
}

.menu li {
    margin: 0 20px;
}

.menu li a {
    text-decoration: none;
    color: white;  /* White text */
    font-size: 18px;
    padding: 10px;
    transition: background-color 0.3s;
}

.menu li a:hover {
    opacity: 0.9; /* Darker pink on hover */
}
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrap {
    flex: 1 0 auto;
}

body {
    font-family: 'Karla', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background 0.3s, color 0.3s;
}

header {
    background: linear-gradient(245deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    position: relative;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

input[type='text'],
input[type='number'],
input[type='password'],
input[type='file'],
button {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
    display: block;
    padding: 1rem;
    border: none;
    border-radius: 64px;
	background-color: #f0f0f0;
    font-size: 1.1rem;
}

button {
    margin-top: 1rem;
}

#upload-section {
    display: flex;
    width: 100vw;
    flex-direction: column;
}

.radio-container {
    display: flex;
    justify-content: space-around;
}

.column-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin-bottom: 1rem;
}

input[type='checkbox'] {
	accent-color: var(--secondary-color);
	transform: scale(1.5);
}

.video-report-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}
#video-player-container, .report-section {
    flex: 1;
    margin-bottom: 1.5rem;
    flex-direction: column;
    min-height: 400px;
}

button {
    width: 100%;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    transition: opacity 0.3s;
}

button:hover {
    opacity: 0.9;
}
#analyze-btn {
    margin-top: 1rem;
}

.content-container {
    background-color: rgba(185, 222, 255, 0.6);
    padding: 2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    overflow-y: auto;
    min-height: 225px;
    line-height: 1.6;
}

#theme-toggle {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 150px;
    font-size: 1rem;
}

#image-container-row {
    background-color: rgba(185, 222, 255, 0.6);
    border-radius: 24px;
    height: 100%;
    max-height: 400px;
    overflow-y: scroll;
    display: flex;
    padding: 0 4px;
    gap: 10px;
    margin-top: 20px;
    flex-direction: column;
    justify-content: space-between;
}

.button-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: stretch;
}

.button-container > button {
    margin-right: 0.5rem;
    margin-left: 0.5rem;
}
  
/* Create four equal columns that sits next to each other */
#image-container-column {
    display: flex;
    max-width: 100%;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
}

#image-container-column img {
    max-width: 200px; 
    max-height: 200px;
    object-fit: contain;
    vertical-align: middle;
    width: 100%;
}

#user-info {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
}

#username-display {
    margin-right: 1.5rem;
    font-size: 1.1rem;
}

#logout-btn {
    background-color: var(--error-color);
}

#main-section > div {
    margin-bottom: 3rem;
}

body.dark-mode {
    --bg-color: #333333;
    --text-color: #FFFFFF;
    --bg-gradient-1: linear-gradient(185deg, rgba(51, 51, 51, 0) 0%, #552A2A 100%);
    --bg-gradient-2: linear-gradient(175deg, rgba(56, 16, 66, 0) 0%, rgba(17, 41, 61, 0.20) 100%);
}

body.dark-mode {
    background: var(--bg-gradient-1), var(--bg-gradient-2);
}

body.dark-mode header {
    background: linear-gradient(245deg, #CC6666 0%, #6F5FB1 100%);
}

body.dark-mode .content-container {
    background-color: rgba(71, 87, 102, 0.6);
}

body.dark-mode input {
    background-color: #555555;
    color: #FFFFFF;
}
body.dark-mode button {
    background-color: #312850;
    color: #FFFFFF;
}

body.dark-mode #theme-toggle {
    background-color: rgba(0, 0, 0, 0.3);
}

#video-player {
    width: 100%;
    max-width: 100%;
    max-height: 400px;
    border-radius: 24px;
    flex-grow: 1;
}

.content-container {
    max-width: 100%;
    max-height: 400px;
    border-radius: 24px;
    flex-grow: 1;
}

#video-player {
	overflow: hidden;
}

#api-key-section {
	display: flex;
	justify-content: end;
}

#api-key-section > div {
	display: flex;
	flex-direction: column;
    margin: 10px;
}

#input-api-key {
	width: 30vw;
	margin-bottom: 0.5rem;
}
.show-password{
    margin-left: 1rem;
    letter-spacing: -0.5px;
    color: var(--text-color);
}

.report-section {
    flex: 1;
    display: block;
    height: 100%;
    margin-bottom: 0rem;
}

/* Footer Styles */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

footer p {
    margin: 0;
}

footer nav {
    display: flex;
    gap: 1.5rem;
}

footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 0.8;
}
/* Dark mode styles for footer */
body.dark-mode footer {
    background-color: #312850;
}

/* Dark mode styles */
.dark-mode .markdown-body {
    color: #c9d1d9;
    background-color: #0d1117;
}

.dark-mode .markdown-body code {
    background-color: rgba(240,246,252,0.15);
}

.dark-mode .markdown-body pre {
    background-color: #161b22;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .video-report-container {
        flex-direction: column;
    }

    #video-player-container, .report-section {
        min-height: auto;
    }

    #video-player, .content-container {
        min-height: 200px;
    }
    header {
        padding: 1rem;
        flex-direction: column;
        min-height: auto;
        font-size: auto;
        flex-grow: auto;
        flex-wrap: auto;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    footer nav {
        margin-top: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
}