:root {
    --accent-color: rgb(255, 255, 255);
    --accent-color-dark: rgb(200, 200, 200);
    --light-accent: rgb(58, 128, 255);
    --background-color: rgb(32, 34, 36);
    --alternate-background-color: rgb(44, 46, 48);
    --alternate-2-background-color: rgb(66, 68, 70);
    --foreground-color: rgb(200, 200, 200);
    --mild-foreground-color: rgb(128, 128, 128);
    --very-mild-foreground-color: rgb(80, 80, 80);
    --success-color: rgb(101, 212, 108);
    --danger-color: rgb(225, 29, 72);
    --danger-color-dark: rgb(190, 18, 60);
    --info-color: rgb(58, 128, 255);
    --warning-color: rgb(255, 188, 17);
    --primary-color: rgb(255, 255, 255);

    --intense-foreground-color: rgb(255, 255, 255);
    --intense-background-color: rgb(0, 0, 0);
    --intense-accent-color: rgb(58, 128, 255);

    --semi-intense-background-color: rgb(26, 27, 29);
    --semi-intense-alternate-background-color:rgb(55, 58, 60);
    --semi-translucent-foreground-color: rgba(200, 200, 200, 0.3);
    --semi-translucent-accent-color: rgba(24, 106, 255, 0.502);
    --semi-translucent-danger-color: rgba(255, 0, 0, 0.502);

    --translucent-alternate-2-background-color: rgba(66, 68, 70, 0.8);
    --translucent-foreground-color: rgba(200, 200, 200, 0.2);
    --translucent-accent: rgba(24, 106, 255, 0.102);
    --translucent-danger-color: rgba(255, 0, 0, 0.102);

    --light-danger: rgb(237, 75, 62);
    --neutral: transparent;

    --push-button-width: 180px;
    --push-button-padding: 8px;
}

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

html, body {
    height: 100%;
}

html {
    font-size: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    color: var(--foreground-color);
    background-color: var(--background-color);
}

a {
    color: white;
}

hr {
    border: none;
    height: 1px;
    margin-left: 100px;
    margin-right: 100px;
    background-color: var(--very-mild-foreground-color);
}

footer {
    grid-area: footer;
    background-color: var(--intense-background-color);
    color: var(--mild-foreground-color);
    text-align: center;
    padding: 15px;
    font-size: 0.8rem;
}

input[type="text"], input[type="password"] {
    display: block;
    width: var(--push-button-width);
    box-sizing: border-box; 
    font-size: 1rem;
    border: none;
    padding: var(--push-button-padding);
    border-radius: 5px;
    color:var(--foreground-color);
    background-color: var(--alternate-background-color);
    outline: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
}

input[type="text"]::placeholder, input[type="password"]::placeholder {
    color: var(--semi-translucent-foreground-color);
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
}

input[type="text"]:hover, input[type="password"]:hover {
    background-color: var(--semi-intense-alternate-background-color);
    transition: all 0.25s;
}

input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    background-color: var(--semi-intense-alternate-background-color);
}

nav.desktop {
    grid-area: desktop-nav;
    background-color: var(--alternate-background-color);
}

nav.desktop ul {
    list-style-type: none;
    align-items: stretch;
}

nav.desktop ul li:first-child {
    margin-top: 20px;
}

nav.desktop ul li a {
    text-decoration: none;
    color: var(--accent-color);
    display: block;
    font-size: 1rem;
    padding: 8px;
    border-radius: 5px;
    margin: 8px;
}

nav.desktop ul li a:hover {
    background-color: var(--translucent-foreground-color);
    transition: all 0.25s;
}

nav.desktop ul li a.active {
    background-color: var(--translucent-foreground-color);
}

nav.mobile {
    position: fixed;
    bottom: 0;
    left: 0;          
    right: 0;         
    overflow: hidden; 
    justify-content: space-around; 
    background-color: var(--intense-background-color);
    padding: 20px 0;  
    z-index: 1;
    display: none;
}

nav.mobile a {
    text-decoration: none;
    color: var(--mild-foreground-color);
    font-size: 22px
}

nav.mobile a:hover {
    color: var(--intense-foreground-color);
}

nav.mobile a.active {
    color: var(--intense-foreground-color);
}

#account-popup.hidden {
    display: none;
}

#account-popup {
    position: absolute;
    top: 65px;
    right: 5px;
    background: var(--alternate-background-color);
    border-radius: 10px;
    z-index: 1000;
    display: flex;
    padding-top: 10px;
    flex-direction: column;
    align-items: center;
    border: 2px solid var(--background-color);
}

#account-popup p {
    margin-top: 5px;
    margin-bottom: 20px;
}

#account-popup hr {
    color: gray;
}

#account-popup ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#account-popup li {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

#account-popup li a {
    text-decoration: none;
    color: #333;
    flex: 1;
    text-align: left;
}

#account-popup .user-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

#account-popup .user-avatar img {
    border-radius: 50%;
    width: 55px;
    height: 55px;
}

#copyright {
    font-size: 0.8rem;
}

.box-layout {
    display: flex;
    gap: 12px;
}

.box-layout.vertical {
    flex-direction: column;
    width: 100%;
}

.box-layout.vertical form {
    display: contents;
}

.box-layout.align-horizontal-center {
    align-items: center;
}

.box-layout.horizontal {
    flex-direction: row;
    justify-content: space-between;
}

.box-layout.horizontal form {
    display: contents;
}

.long-field {
    width: 100%;
}

.input-with-button {
    position: relative;
    width: 100%;
}

.input-with-button input[type="text"] {
    width: 100%;
}

.input-with-button button {
    all: unset;
    position: absolute;
    right: var(--push-button-padding);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.input-with-button button i {
    font-size: 1rem;
    color: var(--accent-color);
}

.input-with-button button:hover i {
    color: var(--accent-color-dark);
    transition: all 0.25s;
}

.added-item {
    position: relative;
    padding-right: 50px;
    width: 100%;
    display: block;
    font-size: 1rem;
    border: none;
    padding: var(--push-button-padding);
    border-radius: 5px;
    color:var(--foreground-color);
    background-color: var(--alternate-background-color);
    outline: none;
    box-sizing: border-box;
}

.added-item p {
    padding-right: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.added-item button {
    all: unset;
    position: absolute;
    right: var(--push-button-padding);
    cursor: pointer;
}

.added-item button i {
    font-size: 1rem;
    color: var(--danger-color);
}

.added-item button:hover i {
    color: var(--danger-color-dark);
    transition: all 0.25s;
}

.centered-content-layout {
    display: grid;
    height: 100%;
    margin: 0;
    gap: 0;
    justify-content: center;
    align-content: center;
}

.panel {
    display: flex;
    justify-content: flex-end;
    font-size: 3em;
    padding: 14px 0;
}


.left, .right {
    padding: 20px;
}

.left {
    padding: 0
}

.right {
    grid-column: 3 / 4;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--background-color);
}

.circle {
    display: inline-block;
    width: 1.4em;
    height: 1.4em;
    border-radius: 50%;
    background-color: #eeeef3;
    color: #1f1f26d9;
    text-align: center;
    line-height: 1.4em;
    margin-right: 15px;
}

/* forms */



.logo {
    width: 55px;
    height: 55px;
    border-radius: 5px;
    margin: 0;
}

.link {
    color: var(--accent-color);
    cursor: pointer;
    margin-left: 29px;
}

.link:hover {
    color: var(--light-accent);
}

.login-links {
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-links input {
    margin-right: 1px;
    height: 0.8em;
}

.vertical-fields {
    margin: 20px;
}

.spacer {
    flex-grow: 1;
  }

.form-field {
    outline: none;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    background-color: transparent;
    color:rgba(0, 0, 0, 0.5);
    padding: 5px;
    width: 400px;
    font-size: 1rem;
}

.form-field:focus {
    border: 1px solid var(--accent-color);
}

.form-field:disabled{
    border: none;
    padding: 6px;
    background-color: rgba(0, 0, 0, 0.1);
    color: #eeeef3;
}

.long-field {
    outline: none;
    border: 1px solid var(--mild-foreground-color);
    border-radius: 5px;
    background-color: transparent;
    color:var(--foreground-color);
    padding: 8px;
    width: 100%;
    font-size: 1rem;
}

.long-field:focus {
    border-color: var(--intense-foreground-color);
    color: var(--foreground-color);
    transition: all 0.25s;
}

.long-field::placeholder {
    color: var(--semi-translucent-foreground-color);
}

/* layouts */

.horizontal-layout {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 0;
    width: 100%;
}

.spacer {
    flex-grow: 1;
}

.section-base-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: auto 1fr 800px 1fr; 
    grid-template-rows: 40px 1fr;
    grid-template-areas:
        "top-bar top-bar top-bar top-bar"
        "desktop-nav . right ."
        "footer footer footer footer";
    align-items: stretch;
}

.top-bar {
    grid-area: top-bar;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--intense-background-color);
    color: white;
    padding: 20px 25px;
}

.top-bar img {
    margin-left: auto;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
}

/* messages */
/* fix colors */

.message {
    border-radius: 1px;
    color: white;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; 
}

.error-message {
    color: var(--danger-color);
    font-size: 0.7rem;
}

.error-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
}

.error-container i {
    color: var(--danger-color);
}

.success-message {
    background-color: --var(translucent-accent-color);
}


.login-message {
    display: inline-block;
    color: var(--danger);
    margin-top: 7px;
    height: 1em;
}

.test {
    display: flex;
    margin: auto;
    width: 50%;
    border: 1px solid red;
}

.centered-container {
    display: flex;
    align-items: center;
    height: 600px;
    border: 2px solid #006100; 
    margin: auto;
  }

.bg {
    width: 100vh;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; 
}

@media (max-width: 1000px) {
    .section-base-layout {
        grid-template-columns: 100%;
        grid-template-rows: 60px auto 80px;
    }

    .top-bar img {
        width: 40px;
        height: 40px;
    }

    /* .top-bar {
        grid-area: top-bar;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--intense-background-color);
        color: white;
        padding: 20px 25px;
    } */

    nav.desktop {
        display: none;
    }

    nav.mobile {
        display: flex;
    }

    .right {
        grid-column: 1 / 2;
    }
}

section.field-section {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--alternate-background-color);
    border-radius: 8px;
    gap: 12px;
    padding: 12px;
    align-items: flex-start;
    position: relative;
}

.field-section span {
    font-size: 0.7rem;
    position: absolute;
    top: 0;
    transform: translateY(-57%);
    font-weight: 300;
    color: var(--foreground-color);
    background-color: var(--background-color);
}

.field-section form {
    display: contents; /* Flatten the form so it doesn't act as a separate block */
  }

.section-title {
    font-size: 1.7rem;
    font-weight: 200;
    margin-bottom: 10px;
}

/* video queue */

.video-queue-item {
    display: grid;
    grid-template-columns: auto 1fr; /* Fixed width for left item */
    grid-template-rows: repeat(2, 1fr); /* Two rows */
    padding: 8px;
    font-size: 1rem;
    background-color: var(--semi-intense-background-color);
    border-radius: 5px;
}

.video-queue-item img
{
    width: 16px;
    height: 9px;
    grid-row: span 2;
    border-radius: 5px;
}

.field-with-button
{
    gap: 8px;
    display: flex;
}

.top-right
{
    padding-top: 10px;
    padding-left: 10px;
}

.bottom-right
{
    align-self: end;
    justify-self: end;
}

/* the below video stuff is, quite frankly, criminal, maybe fix it later */

.added-video-item {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 1rem;
    overflow: hidden;
}

.added-video-item button {
    all: unset;
    position: absolute;
    cursor: pointer;
}

.added-video-item button i {
    font-size: 1rem;
    color: var(--danger-color);
}

.added-video-item button:hover i {
    color: var(--danger-color-dark);
    transition: all 0.25s;
}

.video-title {
    flex-grow: 1;
    margin-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

.video-grid form {
    display: contents;
}


.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.thumbnail-container {
    position: relative;
    display: inline-block;
    width: 57px;
    height: 32px;
    margin-right: 10px;
}

.thumbnail-container img {
    display: block;
    width: 57px;
    height: 32px;
    border-radius: 5px;
}

.omg-container {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 57px;
    margin-right: 10px;
}

.omg-container img {
    display: block;
    width: 32px;
    height: 57px;
    border-radius: 5px;
}

.video-duration-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--foreground-color);
    font-size: 0.6rem;
    padding: 1px 2px;
    margin: 1px;
    border-radius: 5px;
}

.line {
    background-color: var(--alternate-background-color);
}
  
.line.horizontal {
    width: 100%;
    height: 2px;
}

.line.vertical {
    width: 2px;
    height: 100%;
}

#processingIndicator,
#downloadProcessingIndicator,
#queueProcessingIndicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
}

#queueProcessingIndicator .spinner-container span {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

.spinner {
    animation: rotate 2s linear infinite !important;
    width: 50px;
    height: 50px;
    filter: invert(1);
    margin-bottom: 10px;
}
  
  @keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
.processing-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    pointer-events: none;
    display: none;
  }
  
  .spinner-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
