* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}
:root {
    --bg-color: #080808;
    --second-bg-color: #363636;
    --text-color: white;
    --main-color: #03ec3d;
    --dark-green: #008F11;
    --dim-green: #005F08;
    --gradient: linear-gradient(90deg, #009111, #00ff40);
    --speed: 2.5s;
}

::-webkit-scrollbar{
    width: 20px;
}

::-webkit-scrollbar-thumb{
    background-color: var(--main-color);
}

::-webkit-scrollbar-track{
    background-color: var(--bg-color);
}

html {
    overflow-x: hidden;
}

body {
    background-image: url('images/burn-after-reading.png'); /* Replace with your image URL */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-size: cover; /* Ensures the image covers the entire viewport */
    background-attachment: fixed; /* Makes the image persist when scrolling */
    background-position: center; /* Centers the image */
    background-color: var(--bg-color);
    color: var(--text-color)
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Black overlay with 50% opacity */
    z-index: -1; /* Ensure it appears above the background image */
    pointer-events: none; /* Allows clicking through the overlay */
  }

h1{
    font-size: 5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    line-height: 1;
}

h2 {
    font-size: 2rem;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-items: center;
    justify-content: center;
    text-align: center;
    margin: 40px;
    margin-bottom: 5px;
}

.content, #app {
    text-align: center;
    margin: 40px;
}

.subtitle {
    text-align: center;
    margin: 10px;
}

#url-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#url-input {
    margin-left: 5px;
    width: 80vw;
}

#yt-link {
    border: none;
}

.hidden { display: none; }
.loading { font-size: 1.5em; }

#waveform-container {
    text-align: center;
    display: flex;
    flex-direction: column;
}

#waveform-container canvas {
    align-self: center;
    /* width: 100%; */
    height: 62px;
    background-color: rgba(84, 84, 84, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 25px;
}

.canvas-wrapper {
    display: flex;
    flex-direction: row;
    position: relative;
}

#play-pause-btn {
    align-self: center;
    padding: 2px 2px 2px 4px;
    border-radius: 50%;
    font-size: 5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
    height: fit-content;
    width: fit-content;
}

.timeline-editor {
    height: 102px;
    /* border: 2px solid rgba(156, 156, 156, 0.582); */
    /* width: 90%; */
    position: relative;
    display: flex;
    /* background-color: black; */
    border-radius: 10px;
    margin: auto;
}

.timeline {
    display: flex;
    align-self: center;
    /* padding: 10px; */
    /* position: absolute; */
    /* width: 100%; */
    height: 102px;
    color: #fff;
}

#wave {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slider {
    align-self: center;
    /* width: 100%; */
    height: 102px;
    position: absolute;
    display: flex;
    align-items: center;
    /* padding: 10px; */
}

/* .timeline-editor, .slider {
    width: 800px;
} */

.resizable-rect {
    z-index: 10;
    align-self: center;
    width: 100%;
    height: 62px;
    background-color: rgba(0, 255, 8, 0.1);
    border-top: 3px solid rgb(0, 182, 0);
    border-bottom: 3px solid rgb(0, 182, 0);
    position: absolute;
}

.resize-handle {
    position: absolute;
    background-color: rgb(0, 182, 0);
    height: 62px;
    z-index: 10;
    width: 10px;
    top: -3px;
    bottom: 0;
    cursor: col-resize;
}
  
#resize-right {
    right: -10px;
    border-radius: 0px 5px 5px 0px;
    cursor: e-resize;
}

.resizable-rect, .slider {
    transition: none;
}  
  
#resize-left {
    left: -10px;
    border-radius: 5px 0px 0px 5px;
    cursor: w-resize;
}

#timer {
    margin-bottom: 20px;
    font-weight: 600;
}

.input-and-label {
    align-self: center;
    width: fit-content;
    display: flex;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
}

#youtube-form p {
    padding: 5px;
    width: fit-content;
}

#form-error, #selection-warning {
    font-size: 16px;
    color: #ff3131;
    width: fit-content;
    margin: auto;
    border-radius: 5px;
    padding: 5px 11px;
}

.in-out-field {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ccc;
}

input {
    padding: 5px 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
}

label {
    font-size: 1.2rem;
    vertical-align: bottom;
    padding: 5px;
}

button {
    display: flex;
    align-items: center;
    align-self: center;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 25px;
    background-color: #080808;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin: 10px 20px;
    transition: 0.2s ease-in-out;
}

button:hover {
    cursor: pointer;
    transform: scale(105%);
    text-shadow: 0px 0px 4px var(--main-color),
                0px 0px 18px var(--main-color);
    box-shadow: 0px 0px 4px var(--main-color),
                0px 0px 18px var(--main-color);
}

#save-audio-btn {
    margin: 0px 10px;
}

#save-audio-btn:disabled:hover {
    animation: none;
    transition: none;
    transform: none;
    text-shadow: none;
    box-shadow: none;
}

#save-audio-btn:disabled {
    background-color: dimgrey;
    color: linen;
    opacity: 0.5;
    cursor: not-allowed;
}

#selection-size {
    font-size: 20px;
    font-weight: 600;
}

.controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.gradiented{
    background: var(--gradient);
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.loader{
    margin: 0 0 2em;
    height: 100px;
    width: 100%;
    text-align: center;
    padding: 1em;
    margin: 0 auto 1em;
    display: inline-block;
    vertical-align: top;
}
  
svg path,
svg rect{
    fill: var(--main-color);
}
  
@media (pointer: coarse) {
    .resize-handle {
        width: 24px; /* larger touch target */
    }
}