: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%;
    margin: 0;
    padding: 0;
}

.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);
    background: var(--bg-gradient-1), var(--bg-gradient-2);
    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='password'],
input[type='file'],
button {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 64px;
	background-color: #f0f0f0;
    font-size: 1.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 {
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    transition: opacity 0.3s;
}

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

#report-container {
    background-color: rgba(185, 222, 255, 0.6);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    overflow-y: auto;
    min-height: 225px;
    font-family: 'Karla', sans-serif;
    line-height: 1.6;
    max-height: 400px;
}
#report-container h1, #report-container h2, #report-container h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}
#report-container p {
    margin-bottom: 1em;
}

#report-container ul, #report-container ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

#report-container code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

#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;
}

#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 #report-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,
#report-container {
    width: 100%;
    max-width: 100%;
    border-radius: 24px;
    flex-grow: 1;
}
#video-player {
	overflow: hidden;
}

#api-key-section {
	display: flex;
	justify-content: end;
	margin-bottom: 0;
}
#api-key-section > div {
	display: flex;
	flex-direction: column;
}

#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: flex;
    flex-direction: column;
    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;
}


.markdown-body {
    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-body h1 { font-size: 2em; }
.markdown-body h2 { font-size: 1.5em; }
.markdown-body h3 { font-size: 1.25em; }

.markdown-body p {
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-body code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
}

.markdown-body pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 2em;
}

.markdown-body li {
    margin-top: 0.25em;
}

/* 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, #report-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;
    }
    
}