:root {
    /* Primary Colors */
    --primary-color: #2a9d8f;
    --primary-hover-color: #21867a;
    --secondary-color: #264653;
    --text-light-color: #ffffff;

    /* Background Colors */
    --background-light: #e9ecef;
    --background-blue-light: #f4faff;

    /* Border Colors */
    --border-light: #ccc;
    --border-primary: #4919b9;

    /* Highlight Colors */
    --highlight-color: #eef;

    /* Text Colors */
    --text-color: #333;
    --text-muted: #828282;

    /* Misc */
    --highlight-hover-color: yellow;
    --highlight-text: red;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--secondary-color);
    padding: var(--spacing-medium) var(--spacing-large);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    list-style-type: none;
    gap: 10px;
}

.navbar .brand,
.nav-links a {
    color: var(--text-light-color);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5em;
    background: none;
    color: var(--text-light-color);
    border: none;
    cursor: pointer;
}

#home {
    text-align: center;
    padding: var(--spacing-large) var(--spacing-medium);
    background-color: var(--background-light);
}

#home h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

#videoPlayer {
    margin-top: var(--spacing-medium);
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* Main content */
.section {
    padding: 40px 20px;
    text-align: center;
}

.section h2 {
    margin-bottom: 15px;
    font-size: 1.8em;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light-color);
    padding: 10px 0;
    text-align: center;
}

/* Utilities */
.hidden {
    display: none;
}

.bordered {
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background-color: var(--background-light);
    padding: 10px;
    margin: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--text-light-color);
    font-size: 1em;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--primary-hover-color);
}

/* Thumbnail Styles */
.thumbnail {
    width: 100px;
    height: auto;
    margin: 5px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    object-fit: cover;
}

.thumbnail img {
    width: 100%;
    height: auto;
}

.thumbnail:hover {
    transform: scale(1.1);
}

.thumbnailList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: calc(5 * 100px + 4 * 10px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-light);
    background-color: var(--background-light);
}

/* Directory Structure */
#directoryStructure {
    font-family: Verdana, sans-serif;
}

.directory,
.file {
    cursor: pointer;
}

details {
    font-size: 1.2rem;
    background: lightyellow;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
    opacity: 1;
    transition: opacity 1s ease-out;
}

details .fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

.dirNameLabel {
    text-align: left; /* Ensure text aligns left */
    flex: 1; /* Allow the name to take available space */
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-right: 10px; /* Add some space between text and icon */
}

.directory {
    width: 100%; /* Ensures it spans the container */
    border-bottom: 1px solid var(--border-light); /* Optional for a table-like look */
    padding: 5px 0;
}

.directory:hover {
    background-color: var(--highlight-color);
/*    transform: scale(1.02);*/
    border-color: var(--primary-color);
}

.directory-row {
    display: grid;
    grid-template-columns: auto 50px; /* First column adjusts to text; second is fixed */
    align-items: center; /* Vertically align text and icons */
    padding: 5px 0;
}

.dirNameLabel {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: left; /* Align text to the left */
}

.iconCell {
    display: flex;
    justify-content: center; /* Center icon horizontally */
    align-items: center; /* Center icon vertically */
}

.analysisIcon {
    font-size: 1.5rem; /* Adjust icon size */
    color: var(--text-muted); /* Default color */
    flex-shrink: 0; /* Prevent the icon from resizing */
}

.directory.analyzed_dir .analysisIcon {
    color: green;
}
.directory.not_analyzed_dir .analysisIcon {
    color: pink;
}

.onlyMe {
    display: none; /* Hidden by default */
}

.file {
    margin-left: 20px;
    color: var(--primary-color);
}

/* Video Analysis */
.videoAnalyze_box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--background-blue-light);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.videoScreenshotDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 15px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--background-blue-light);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
    gap: 10px;
}

.videoScreenshotDiv img {
    max-width: 100px;
    border-radius: 5px;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
}

.videoScreenshotDiv img:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.details .filename {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text-color);
}

.details .duration {
    font-size: 1em;
    color: var(--text-muted);
}

/* Stream Details */
.streams {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
}

.stream_div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
    color: var(--text-color);
    background-color: var(--highlight-color);
    border-radius: 5px;
    padding: 10px;
    border: 1px solid var(--border-light);
    min-width: 200px;
}

.stream_div .label {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* Options Section */
/*
.options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
*/

.edit_div {
    margin: 5px;
    width: 100%;
}


.edit_div {
    flex: 1;
    text-align: center;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--secondary-color);
        position: absolute;
        top: 60px;
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .navbar.expanded .nav-links {
        display: flex;
    }

    .streams {
        flex-direction: column;
    }

    .options {
        justify-content: center;
    }

    .videoAnalyze_box {
        padding: 10px;
    }

    .details {
        gap: 5px;
    }
}

.video_to_concat {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 5px;
    border: 1px solid var(--border-primary);
    background-color: var(--background-light);
    border-radius: 5px;
}

.video_streams,
.audio_streams {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.play-button {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 16px;
    background-color: var(--primary-color);
    color: var(--text-light-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.test {
    background-color: var(--highlight-hover-color);
}

.beingAnalyzed {
    color: var(--highlight-text);
}

/*   Modal  */


.modalContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--background-blue-light);
    border: 2px solid var(--border-primary);
    border-radius: 15px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    margin: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modalContent:hover {
    transform: scale(1.02);
    opacity: 0.98;
}

.largeScreenshot {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.largeScreenshot img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.thumbnailList {
    display: flex; /* Arrange thumbnails in a single row */
    gap: 10px; /* Space between thumbnails */
    overflow-x: auto; /* Enable horizontal scrolling */
    overflow-y: hidden; /* Prevent vertical overflow */
    max-width: 600px; /* Limit the width to fit the parent container */
    max-height: 100px; /* Limit the height to one row */
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background-color: var(--background-light);
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: var(--primary-color) var(--background-light);
}

/* Customize the scrollbar for better visibility */
.thumbnailList::-webkit-scrollbar {
    height: 8px; /* Horizontal scrollbar height */
}

.thumbnailList::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.thumbnailList::-webkit-scrollbar-track {
    background-color: var(--background-light);
}

.thumbnailDiv {
    flex: 0 0 auto; /* Prevent thumbnails from wrapping or resizing */
    width: 80px; /* Fixed width for consistency */
    height: 80px; /* Fixed height for consistency */
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.3s ease;
}

.thumbnailDiv:hover {
    transform: scale(1.1); /* Add subtle hover scaling */
    border-color: var(--primary-color); /* Highlight on hover */
}


.thumbnailDiv img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnailDiv.active {
    border-color: var(--primary-hover-color);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.thumbnailWrapper {
    display: flex;
    flex-direction: row;

}
@media (max-width: 768px) {
    .modalContent {
        padding: 15px;
    }

    .thumbnailList {
        gap: 10px;
        max-height: 150px;
    }

    .largeScreenshot {
        max-width: 100%;
    }
}


#authBadge{
    position:fixed; top:12px; right:12px; z-index:9999;
    display:flex; align-items:center; gap:8px; font-family:system-ui,Segoe UI,Roboto,Arial;
  }
  .auth-btn{
    display:inline-flex; align-items:center; gap:6px;
    padding:6px 10px; border-radius:999px; border:1px solid #ddd;
    background:#fff; color:#333; text-decoration:none; cursor:pointer;
  }
  .auth-avatar{
    width:32px; height:32px; border-radius:50%;
    display:inline-flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; user-select:none; overflow:hidden;
  }
  .auth-avatar img{ width:100%; height:100%; object-fit:cover; border-radius:50%; }
  .auth-meta{ font-size:12px; color:#666; }
  