/* Reset and global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #121212, #1e1e1e);
    color: #e0e0e0;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background: linear-gradient(135deg, #282c34, #20232a);
    color: #61dafb;
    padding: 1rem 2rem;
    text-align: center;
    border-bottom: 2px solid #61dafb;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

button {
    background: #61dafb;
    color: #282c34;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.2s;
    margin: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: #4fa3b4;
}

button:active {
    transform: scale(0.98);
}

/* Parent container to center its content */
.container {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically (if needed) */
    height: 35vh; /* Full viewport height to center vertically */
}

.textInput {
    width: calc(100% - 2rem);
    max-width: 600px;
    height: 150px;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    resize: none;
    font-size: 1rem;
    background: #2e2e2e;
    color: #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 1rem auto; /* Center horizontally if not using flexbox */
}

.textInput:focus {
    outline: none;
    border: 2px solid #61dafb;
    box-shadow: 0 0 5px rgba(97, 218, 251, 0.5);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto;
    max-width: 600px;
    padding: 0 1rem;
}

label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #d0d0d0;
}

select, input[type="range"] {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    background: #2e2e2e;
    color: #e0e0e0;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

select {
    font-size: 1rem;
}

input[type="range"] {
    -webkit-appearance: none;
    background: linear-gradient(90deg, #61dafb 0%, #61dafb 50%, #2e2e2e 50%, #2e2e2e 100%);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #282c34;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #282c34;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    textarea {
        height: 120px;
    }

    .controls {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    button {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    textarea {
        height: 100px;
    }

    .controls {
        padding: 0 0.5rem;
    }
}

/* Dark mode adjustments */
.dark-mode {
    background: linear-gradient(135deg, #121212, #1e1e1e);
    color: #e0e0e0;
}

.dark-mode header {
    background: linear-gradient(135deg, #1f1f1f, #282c34);
    border-bottom: 2px solid #61dafb;
}

.dark-mode textarea {
    background: #1e1e1e;
}

.dark-mode select, 
.dark-mode input[type="range"] {
    background: #1e1e1e;
    color: #e0e0e0;
}





/* Progress bar styling */
input[type="range"] {
    -webkit-appearance: none;
    background: linear-gradient(
        to right,
        #61dafb 0%,
        #61dafb var(--range-progress, 0%),
        #2e2e2e var(--range-progress, 0%),
        #2e2e2e 100%
    );
    height: 8px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #282c34;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #282c34;
    cursor: pointer;
}
