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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 70vw;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.header {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.controls {
    padding: 30px;
}

.control-group-horizontal {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.control-group-horizontal h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.controls-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    align-items: end;
    justify-items: center;
    margin-top: 20px;
}



.slider-container {
    margin-bottom: 20px;
    width: 100%;
    max-width: 250px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #555;
    font-weight: 500;
}

.slider-value {
    background: #ff6b35;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


.generate-btn {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 30px auto;
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.4);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results {
    padding: 0 30px 30px;
}

.results h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.password-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.password-item {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.password-item:hover {
    border-color: #ff6b35;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.1);
}

.password-text {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.1rem;
    color: #333;
    flex-grow: 1;
    margin-right: 15px;
    word-break: break-all;
    cursor: pointer;
    user-select: all;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.password-text:hover {
    background-color: #f0f8ff;
}

.password-text:active {
    background-color: #e6f2ff;
}

.copy-btn {
    background: #1a237e;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.copy-btn:hover {
    background: #0d47a1;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #ff6b35;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    user-select: none;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    border-color: #ff6b35;
}

.checkbox-input:checked ~ .checkmark {
    background-color: #ff6b35;
    border-color: #ff6b35;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .controls-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checkbox-container {
        margin-top: 15px;
    }
}