body {
    font-family: Arial, sans-serif;
    background: hsl(182.8, 57.3%, 14.7%);
    padding: 40px;
    height:90vh;
    position: relative;
}

.container {
    position: absolute;
    bottom:1em;
    max-width: 300px;
    right:1em;
    margin-top: auto;
    margin-left:auto;
    background: white;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
video {
    max-width:100%;
    height:auto;
    display: block;
}

#videoContainer {
    position: relative;
    display: inline-block;
    background: #000;
    min-height: 200px;
    width: 100%;
}

#videoContainer .play-overlay {
    cursor: pointer;
}

#avatarVideo {
    width: 100%;
    background: url('paula_small.jpg') center/cover no-repeat;
}

h1 {
    margin-top: 0;
}

.input-wrapper {
    display: flex;
    gap: 0;
    margin-top: 10px;
}

.input-wrapper input {
    flex: 1;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    border-color: hsl(182.8, 57.3%, 14.7%);
}

.input-wrapper button {
    padding: 10px 16px;
    font-size: 18px;
    border: 2px solid hsl(182.8, 57.3%, 14.7%);
    background: hsl(182.8, 57.3%, 14.7%);
    color: white;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.input-wrapper button:hover {
    background: hsl(182.8, 57.3%, 30.7%);
    border: 2px solid hsl(182.8, 57.3%, 32.7%);
}

.input-wrapper button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.video-area {
    display: flex;
    flex-direction: column-reverse;
}

.subtitle-overlay {
    max-height: 200px;
    overflow-y: auto;
    pointer-events: none;
}

.subtitle-overlay > * {
    pointer-events: auto;
}


.answer {
    margin: 0;
    padding: 8px 10px;
    background-color: hsl(182.8, 57.3%, 14.7%);
    color: white;
    font-size: 13px;
    line-height: 1.4;
}

.answer:empty {
    display: none;
}

.loading {
    padding: 8px 10px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.6);
    font-size: 13px;
}

.dots::after {
    content: "";
    display: inline-block;
    width: 1em;
    text-align: left;
    animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
    0%   { content: ""; }
    33%  { content: "."; }
    66%  { content: ".."; }
    100% { content: "..."; }
}
.answer h1, .answer h2, .answer h3 {
    margin-top: 8px;
    font-size: 14px;
}

.answer ul {
    padding-left: 16px;
    margin: 4px 0;
}

.sources {
    padding: 6px 10px 10px;
    background: rgba(0, 0, 0, 0.5);
    background: hsl(182.8, 57.3%, 14.7%);
}

.sources:empty {
    display: none;
}

.sources-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.sources-toggle:hover {
    border-color: white;
    color: white;
}

.sources-list {
    margin-top: 6px;
    font-size: 11px;
}

.sources-list a {
    display: block;
    color: #93c5fd;
    text-decoration: none;
    margin-top: 3px;
    word-break: break-all;
}

.sources-list a:hover {
    text-decoration: underline;
    color: white;
}

.video-placeholder {
    position: relative;
    display: inline-block;
}

.video-placeholder img {
    display: block;
    max-width: 100%;
    height: auto;
}

.placeholder-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
}

.placeholder-overlay p {
    margin: 0;
    font-size: 14px;
    color: white;
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;

}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    transition: background 0.2s;
}

.video-wrapper:hover .play-overlay {
    background: rgba(0, 0, 0, 0.2);
}
body {
    background-image:url('para-bg.jpg');
    background-size: cover;
    background-position: top;
}