* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.password-input {
    -webkit-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
    user-select: all;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f6f8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    opacity: 0;
    transition: opacity 0.15s;
}

body.ready {
    opacity: 1;
}

.container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 50px 55px;
    max-width: 760px;
    width: 100%;
    position: relative;
}

.content {
    position: relative;
    z-index: 1;
}

h1 {
    text-align: center;
    color: #1a1a2e;
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.description {
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.create-label {
    text-align: center;
    margin-bottom: 28px;
}

.create-label h2 {
    color: #1a1a2e;
    font-size: 1.35rem;
    font-weight: 700;
}

.password-section {
    margin-bottom: 28px;
}

.password-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.password-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-radius: 14px;
    overflow: hidden;
}

.password-top {
    display: flex;
    align-items: center;
    padding: 0 8px 0 20px;
    flex: 1;
}

.password-input {
    flex: 1;
    font-size: 1.2rem;
    font-family: 'Fira Code', 'SF Mono', monospace;
    font-weight: 500;
    color: #1a1a2e;
    background: transparent;
    border: none;
    outline: none;
    letter-spacing: 0.5px;
    user-select: all;
}

.btn-refresh {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #9ca3af;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    flex-shrink: 0;
    outline: none;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-bar-fill.weak {
    background: #dc2626;
    width: 25%;
}

.strength-bar-fill.medium {
    background: #f59e0b;
    width: 60%;
}

.strength-bar-fill.strong {
    background: #4caf50;
    width: 100%;
}

.btn-copy {
    height: 100%;
    min-height: 60px;
    padding: 0 28px;
    border: none;
    border-radius: 12px;
    background: #4caf50;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    align-self: stretch;
}

.btn-copy:hover {
    background: #43a047;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy.copied {
    background: #2e7d32;
}

.settings {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.length-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.length-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
    white-space: nowrap;
}

.length-input {
    width: 56px;
    height: 44px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    color: #1a1a2e;
    font-family: inherit;
    transition: border-color 0.2s;
}

.length-input:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: none;
}

.length-input::-webkit-inner-spin-button,
.length-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.length-input[type=number] {
    appearance: textfield;
}

.slider-wrap {
    flex: 1;
    height: 44px;
    display: flex;
    align-items: center;
}

.slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 3px;
    cursor: pointer;
    margin: 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid #4caf50;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s, transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.35);
    transform: scale(1.15);
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid #4caf50;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-item input:checked + .custom-checkbox {
    background: #4caf50;
    border-color: #4caf50;
}

.custom-checkbox svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.2s;
}

.checkbox-item input:checked + .custom-checkbox svg {
    opacity: 1;
}

.checkbox-item input {
    display: none;
}

.checkbox-item span {
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    body {
        padding: 16px 12px;
        align-items: flex-start;
        padding-top: 30px;
    }

    .container {
        padding: 36px 24px;
        border-radius: 18px;
    }

    h1 {
        font-size: 1.45rem;
        white-space: normal;
    }

    .description {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .create-label h2 {
        font-size: 1.15rem;
    }

    .password-row {
        flex-direction: column;
        align-items: stretch;
    }

    .password-box {
        border-radius: 12px;
    }

    .password-input {
        font-size: 1.05rem;
    }

    .btn-copy {
        width: 100%;
        min-height: 50px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    .btn-refresh {
        width: 38px;
        height: 38px;
    }

    .length-row {
        justify-content: center;
    }

    .checkboxes {
        gap: 14px 24px;
    }

    .checkbox-item span {
        font-size: 0.88rem;
    }
}

@media (max-width: 420px) {
    h1 {
        font-size: 1.25rem;
    }

    .checkboxes {
        flex-direction: column;
        gap: 14px;
    }
}
