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

body {
    background: #18171F;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    overflow-x: hidden;
}

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: url('https://static.scientificamerican.com/sciam/cache/file/487D54F1-D60D-473F-A1D64D430131C765_source.jpg?crop=16%3A9%2Csmart&w=1920') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.welcome-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.welcome-screen.hide {
    transform: translateY(-100%);
}

.welcome-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.welcome-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.start-btn {
    background: white;
    color: tomato;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.start-btn:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.container {
    width: 100%;
    max-width: 540px;
    position: relative;
    opacity: 0;
    animation: fadeIn 1s ease 0.8s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.guide-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: #A4FFAF;
    color: #18171F;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

.guide-btn:hover {
    background: #8ce99a;
}

.guide-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.guide-modal.show {
    display: flex;
}

.guide-content {
    background: #24232C;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    color: #E6E5EA;
}

.guide-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #A4FFAF;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.guide-close:hover {
    color: #fff;
}

.guide-content h2 {
    color: #A4FFAF;
    margin-bottom: 20px;
}

.guide-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.guide-content strong {
    color: #A4FFAF;
}

.password-display {
    background: #24232C;
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-text {
    color: #E6E5EA;
    font-size: 24px;
    letter-spacing: 2px;
    flex: 1;
    word-break: break-all;
}

.password-text.placeholder {
    color: #817D92;
    opacity: 0.5;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 16px;
    position: relative;
}

.copy-icon {
    width: 24px;
    height: 24px;
    stroke: #A4FFAF;
    fill: none;
    stroke-width: 2;
}

.copy-btn:hover .copy-icon {
    stroke: white;
}

.copy-notification {
    position: absolute;
    top: -35px;
    right: 0;
    background: #A4FFAF;
    color: #18171F;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.copy-notification.show {
    opacity: 1;
}

.error {
    color: tomato;
    font-size: 30px;
    font-weight: 700;
}

.settings {
    background: #24232C;
    padding: 32px 24px;
    border-radius: 8px;
}

.char-length {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.char-length-label {
    color: #E6E5EA;
    font-size: 18px;
}

.char-length-value {
    color: #A4FFAF;
    font-size: 28px;
    font-weight: bold;
}

/* Updated Range Slider Styling */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #A4FFAF 0%, #A4FFAF 0%, #18171F 0%, #18171F 100%);
    border-radius: 4px;
    outline: none;
    margin-bottom: 32px;
    position: relative;
}

/* WebKit browsers (Chrome, Safari, Edge) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    background: #24232C;
    border: 4px solid #E6E5EA;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 2;
    margin-top: -12px;
}

.slider::-webkit-slider-thumb:hover {
    background: #18171F;
    border-color: #A4FFAF;
}

/* Firefox */
.slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    background: #24232C;
    border: 4px solid #E6E5EA;
    border-radius: 50%;
    cursor: pointer;
}

.slider::-moz-range-thumb:hover {
    background: #18171F;
    border-color: #A4FFAF;
}

/* Firefox track */
.slider::-moz-range-track {
    background: #18171F;
    height: 8px;
    border-radius: 4px;
}

.options {
    margin-bottom: 32px;
}

.option {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox {
    width: 20px;
    height: 20px;
    margin-right: 20px;
    cursor: pointer;
    accent-color: #A4FFAF;
}

.option-label {
    color: #E6E5EA;
    font-size: 18px;
    cursor: pointer;
}

.strength-container {
    background: #18171F;
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.strength-label {
    color: #817D92;
    font-size: 16px;
    text-transform: uppercase;
}

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.strength-text {
    color: #E6E5EA;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: bold;
    min-width: 100px;
    text-align: right;
}

.strength-bars {
    display: flex;
    gap: 8px;
}

.strength-bar {
    width: 10px;
    height: 28px;
    border: 2px solid #E6E5EA;
    border-radius: 2px;
}

.strength-bar.filled.too-weak {
    background: #F64A4A;
    border-color: #F64A4A;
}

.strength-bar.filled.weak {
    background: #FB7C58;
    border-color: #FB7C58;
}

.strength-bar.filled.medium {
    background: #F8CD65;
    border-color: #F8CD65;
}

.strength-bar.filled.strong {
    background: #A4FFAF;
    border-color: #A4FFAF;
}

.generate-btn {
    width: 100%;
    background: #A4FFAF;
    color: #18171F;
    border: none;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
}

.generate-btn:hover {
    background: #18171F;
    color: #A4FFAF;
    border: 2px solid #A4FFAF;
}