@import url('https://fonts.googleapis.com/css2?family=Onest:wght@100..900&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    font-family: 'Onest', 'Courier New', Courier, monospace;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Fixed background gradient that stays with viewport */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /*AB TEST: background: radial-gradient(circle at center, #020010, #000);*/
    backdrop-filter: blur(900px);
    z-index: -3;
}

/* Starry Background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('/stardust.png');
    opacity: 0.6;
    z-index: -2;
    animation: twinkle 5s infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 0.8;
    }
}

/* Snowflakes - CPU friendly CSS animations */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.snowflake {
    position: fixed;
    color: #fff;
    opacity: 0.8;
    font-size: 1rem;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
    will-change: transform;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes snowfall {
    0% {
        top: -5%;
        transform: rotate(0deg);
    }
    100% {
        top: 105%;
        transform: rotate(360deg);
    }
}

/* Reduced motion is handled in JS to allow user override */

/* Container for content */
.container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    padding-top: 15px;
    max-width: 800px;
    margin-top: 5px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* Mobile container adjustments */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        padding-top: 8px;
    }

    .container input,
    .container select,
    .container button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .sorting-controls,
    .grouping-controls {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .sorting-controls span,
    .grouping-controls span {
        width: 100%;
        display: block;
        margin-bottom: 5px;
    }

    .sorting-controls select,
    .grouping-controls select {
        width: 100% !important;
    }
}

/* Main heading with neon glow */
h1 {
    font-size: 3em;
    color: #ff0080;
    text-shadow:
        0 0 2px #ff0080,
        0 0 2px #ff0080,
        0 0 2px #ff0080;
    margin: 0;
}

/* Mobile heading */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
}

/* Supporting text */
p {
    font-size: 1.3em;
    color: #00ffff;
    line-height: 1.34;
    margin: 0;
}

/* Link styling */
a {
    color: #ff0080;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    text-decoration: underline;
    color: #fff;
}

/* Background grid overlay */
.grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image:
        linear-gradient(0deg,
            transparent 24%,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.1) 26%,
            transparent 27%,
            transparent 74%,
            rgba(255, 255, 255, 0.1) 75%,
            transparent 76%,
            transparent),
        linear-gradient(90deg,
            transparent 24%,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.1) 26%,
            transparent 27%,
            transparent 74%,
            rgba(255, 255, 255, 0.1) 75%,
            transparent 76%,
            transparent);
    background-size: 50px 50px;
    z-index: 1;
    opacity: 0.3;
}

        /* Divider */
        hr {
            width: 100%;
            border: none;
            border-top: 1px solid #444;
            margin: 1rem 0;
        }

button {
    margin: 20px 0;
    background: #ff0080;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1.5em;
    cursor: pointer;
    transition: background 0.3s;
}

.ssbsbs {
    background: #33011a;
}

.ssbsbs:hover {
    background: #ffffff;
    color: #3e001f;
    text-decoration: dotted underline;
}

pre {
    text-align: left;
    padding-bottom: 200px;
    counter-reset: line;
}

.hljs {
    background-color: #000000d3 !important;
}

.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    text-align: left;
    color: #ccc;
    border-right: 1px solid #333;
    /* your custom style here */
}

/* for block of code */
.hljs-ln-code {
    margin-right: 10px;
    padding-left: 5px !important;
}

.hljs-ln-n::before {
    min-width: 15px;
    margin-right: 5px;
}

img {
    margin-top: 20px;
    max-width: 100%;
    max-height: 70vh;
}

video {
    margin-top: 20px;
    max-width: 100%;
    max-height: 70vh;
}

audio {
    margin-top: 20px;
    max-width: 100%;
    width: 100%;
}

input {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid rgba(130, 112, 158, 0.4);
    background: transparent;
    font-size: 1.1em;
    color: #fff;
}

input[type='submit'] {
    margin: 20px 0;
    background: #ff0080;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.illh {
    display: block;
    margin-top: 5px;
}

/* IF page is smaller than 532px hide illh */
@media (max-width: 532px) {
    .illh {
        margin-top: 0;
        display: inline;
    }
}

.failure {
    color: #ff0000;
    font-weight: bold;
}

/* Additional Styles for Dropzone */
.dropzone {
    height: 150px;
    border: 2px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #999;
    margin: 20px 0;
    cursor: pointer;
    margin-bottom: 0;
}

.barred {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.08' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E") !important;
}

.dropzone:hover {
    background-color: #f9f9f926;
}

.disabled-dropzone:hover {
    background-color: #00000000 !important;
}

.file-list {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px;
    margin: 0;
    font-size: 14px;
}

.file-item-wrap {
    margin-top: 5px !important;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    border: 1px solid #ccc;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.file-item a {
    min-width: fit-content;
    width: 10%;
    cursor: pointer;
}

.file-item span {
    overflow: hidden;
    justify-content: center;
    display: flex;
    align-items: center;
    width: 100%;
}

.file-item input {
    overflow: hidden;
    justify-content: center;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    border-radius: 0;
    border: 0;
    padding: 0;
    flex-grow: 1;
    margin-right: 10px;
    border: none;
    font-size: 14px;
    background: transparent;
    box-sizing: border-box;
}

/* Button container for right-side buttons */
.file-item .actions {
    display: flex;
    gap: 5px;
}

/* Custom tiny button styles */
.file-item button {
    font-size: 12px;
    padding: 3px 6px;
    margin: 0;
    cursor: pointer;
    border-radius: 3px;
        color: #000;
        font-weight: bold;
}

/* Tiny buttons hover effect */
.file-item button:hover {
    background-color: #e0e0e0;
}

/* Mobile responsive buttons */
@media (max-width: 480px) {
    .file-item button {
        font-size: 10px;
        padding: 2px 4px;
    }
    .file-item button i {
        font-size: 14px;
    }
}

/* Mobile metadata bar responsive */
@media (max-width: 480px) {
    div[style*="backdrop-filter: blur(5px)"] {
        height: auto !important;
        overflow: visible !important;
        padding: 6px 4px !important;
        font-size: 0.7em !important;
    }

    div[style*="backdrop-filter: blur(5px)"] span {
        margin-right: 8px !important;
    }
}

/* Icons inside buttons (FontAwesome) */
.file-item button i {
    font-size: 16px;
    color: #000;
}

.force-download-disabled {
    display: none;
}

.selectedsec {
    color: #000000;
    background-color: #ff0080;
    font-weight: bold;
}

.selectedsec:hover {
    color: #000000;
    background-color: #ff0080;
    font-weight: bold;
    text-decoration: dotted underline;
}

.filename-generator {
    padding: 20px 0;
}

@media (max-width: 532px) {
    .hidesmall {
        display: none;
    }
}

.info-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
}

#info {
    padding: 5px;
}

/* Modal overlay: matches replace modal design */
.action-help-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8); /* darker overlay to match replace modal */
    justify-content: center;
    align-items: center;
  }
  .action-help-modal[aria-hidden="false"] {
    display: flex;
  }

  /* Modal content: matches replace modal design */
  .action-help-modal-content {
    background: rgba(0, 0, 0, 0); /* transparent background */
    backdrop-filter: blur(2px); /* subtle blur */
    border: 1px solid rgb(255, 0, 128); /* pink border */
    border-radius: 0px; /* rounded corners */
    padding: 20px;
    max-width: 600px;
    width: calc(100% - 40px);
    box-sizing: border-box;
    color: #fff;
    font-size: 1em;
    position: relative;
    box-shadow: none;
    font-family: inherit;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  /* List style */
  .action-help-modal-content ul {
    margin: 0.5em 0 0 0;
    padding: 0;
    list-style: none;
  }
  .action-help-modal-content li {
    margin: 0.6em 0;
    display: flex;
    align-items: flex-start;
    font-size: 1em;
  }
  .action-help-modal-content .icon {
    display: inline-block;
    width: 1.8em;
    text-align: center;
    margin-right: 0.6em;
    font-size: 1.1em;
  }
  
  /* Close button */
  .action-help-close {
    position: absolute;
    right: 0.7em;
    top: 0.7em;
    background: none;
    color: #fff;
    border: none;
    font-size: 1.4em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    transition: color 0.2s;
  }
  .action-help-close:hover,
  .action-help-close:focus {
    color: #ff0080;
    outline: none;
  }
  
  /* Responsive tweak */
  @media (max-width: 480px) {
    .action-help-modal-content {
      width: calc(100% - 20px);
      padding: 15px;
      font-size: 0.95em;
    }
  }

.action-help-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.3em;
  }
  .action-help-table td {
    vertical-align: top;
    padding: 0.25em 0.5em 0.25em 0;
    font-size: 1em;
    border: none;
  }
  .icon-cell {
    width: 2em;
    text-align: center;
    font-size: 1.2em;
    color: #ff0080;
    padding-right: 0.5em;
  }
  .desc {
    font-size: 0.96em;
    color: #c3bfe4;
    font-weight: 400;
  }
  