/* Minimal styles for functionality */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding: 10px;
    background: #222;
    color: #fff;
}

header {
    background: #333;
    padding: 10px;
    margin-bottom: 10px;
}

header h1 {
    font-size: 20px;
}

header p {
    font-size: 12px;
    color: #aaa;
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}

/* Top controls row styling */
.top-controls-row {
    background: #333;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #555;
}

/* Mode navigation buttons */
.btn-mode {
    background: #444;
    color: #aaa;
    border: 1px solid #666;
    padding: 4px 16px;
    font-weight: bold;
    transition: background 0.15s, color 0.15s;
}

.btn-mode:hover {
    background: #555;
    color: #fff;
}

.btn-mode.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* Content boxes */
.content-box {
    background: #333;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #555;
    height: 100%;
}

.content-box h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

/* Video element - full width within container */
.input_video {
    width: 100%;
    height: auto;
    border: 1px solid #555;
    border-radius: 3px;
}

/* Info panel */
.info-panel {
    max-height: 400px;
    overflow-y: auto;
}

.info-section {
    margin-bottom: 8px;
    border-bottom: 1px solid #444;
    padding-bottom: 6px;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section-header {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #8cf;
    cursor: default;
}

.info-list {
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

.info-item {
    padding: 1px 0;
    font-size: 11px;
    font-family: monospace;
}

.info-label {
    display: inline-block;
    width: 200px;
}

.info-value {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 2px;
}

.flag-active {
    color: #6f6;
}

.flag-inactive {
    color: #f66;
}

/* Blend shapes container - scrollable with fixed height */
.blend-shapes-container {
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

.blend-shapes-item {
    padding: 2px 0;
    font-size: 11px;
}

.blend-shapes-label {
    display: inline-block;
    width: 150px;
}

.blend-shapes-value {
    display: inline-block;
    background: #555;
    padding: 2px 5px;
    border-radius: 2px;
}

/* Visualization boxes - larger for better viewing */
.visualization-box {
    min-height: 400px;
}

.landmark-visualization {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: 1px solid #555;
    border-radius: 3px;
}

#avatar-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

#avatar-container canvas {
    border: 1px solid #555;
    border-radius: 3px;
}

/* Form elements */
input, select, button {
    border: 1px solid #555;
    background: #555;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
}

button {
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #666;
}

.form-label {
    font-size: 11px;
    margin-bottom: 3px;
    display: block;
}

.form-check {
    font-size: 12px;
}

.form-check-input {
    cursor: pointer;
}

.form-check-label {
    margin-left: 5px;
    cursor: pointer;
}

/* Modal and Dialog Fixes - ensure text is visible */
.modal-content {
    background: #fff;
    color: #000;
}

.modal-header,
.modal-body,
.modal-footer {
    color: #000;
}

.modal-body label,
.modal-body h6,
.modal-body .form-label {
    color: #000;
}

/* Bootbox dialog fixes */
.bootbox .modal-content {
    background: #fff;
    color: #000;
}

.bootbox .modal-body {
    color: #000;
}

/* Demo mode playing overlay - click anywhere to stop */
.demo-playing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    cursor: pointer;
    background: transparent;
}

/* Demo mode fullscreen layout */
body.demo-playing {
    padding: 0;
    overflow: hidden;
}

body.demo-playing main {
    padding: 0;
    height: 100vh;
}

body.demo-playing #visualizationsRow {
    height: 100vh;
    margin: 0;
}

body.demo-playing #visualizationsRow > div {
    height: 100vh;
}

body.demo-playing .visualization-box {
    min-height: 100vh;
    border: none;
    border-radius: 0;
}

body.demo-playing .visualization-box h3 {
    display: none;
}

body.demo-playing .landmark-visualization,
body.demo-playing #avatar-container {
    min-height: calc(100vh - 20px);
}

/* Footer */
footer {
    margin-top: 20px;
    padding: 10px;
    background: #333;
    text-align: center;
    font-size: 12px;
}
