/* Контейнер */
.pg-container {
    width: 100%;
    max-width: 100%;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Группы элементов */
.pg-input-group,
.pg-control-group,
.pg-checkbox-group,
.pg-presets,
.pg-actions,
.pg-share {
    margin-bottom: 20px;
}

/* Метки */
.pg-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Поле вывода пароля */
.pg-output-container {
    position: relative;
    display: flex;
    align-items: stretch;
}

.pg-output {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: monospace;
    background: white;
    text-align: center;
    box-sizing: border-box;
}

.pg-copy-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s;
}

.pg-copy-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Слайдер длины */
.pg-range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pg-range {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.pg-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.pg-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
}

.pg-length-value {
    font-weight: bold;
    color: #4CAF50;
    min-width: 30px;
    text-align: center;
}

/* Чекбоксы */
.pg-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
}

.pg-checkbox {
    display: none;
}

.pg-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s;
}

.pg-checkbox:checked + .pg-checkbox-custom {
    background: #4CAF50;
    border-color: #4CAF50;
}

.pg-checkbox:checked + .pg-checkbox-custom::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Пресеты */
.pg-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.pg-preset-btn {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.pg-preset-btn:hover {
    border-color: #4CAF50;
    background: #f8fff8;
}

/* Кнопки действий */
.pg-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pg-generate-btn {
    flex: 2;
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.pg-generate-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.pg-reset-btn {
    flex: 1;
    padding: 12px 24px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.pg-reset-btn:hover {
    background: #da190b;
}

/* Блок поделиться */
.pg-share-label {
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.pg-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pg-share-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pg-share-vk {
    background: #4a76a8;
    color: white;
}

.pg-share-tg {
    background: #0088cc;
    color: white;
}

.pg-share-wa {
    background: #25d366;
    color: white;
}

.pg-share-copy {
    background: #666;
    color: white;
    font-size: 20px;
}

.pg-share-btn:hover {
    transform: scale(1.1);
}

/* Уведомления */
.pg-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    background: #4CAF50;
    color: white;
    padding: 25px 35px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Адаптивность */

/* Tablet */
@media (max-width: 768px) {
    .pg-container {
        padding: 15px;
    }
    
    .pg-presets {
        grid-template-columns: 1fr;
    }
    
    .pg-actions {
        flex-direction: column;
    }
    
    .pg-generate-btn,
    .pg-reset-btn {
        flex: none;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .pg-container {
        padding: 10px;
    }
    
    .pg-output {
        font-size: 14px;
        padding: 10px 45px 10px 10px;
    }
    
    .pg-share-buttons {
        flex-wrap: wrap;
    }
    
    .pg-share-btn {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .pg-range-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .pg-length-value {
        text-align: center;
    }
}